Early version of mv_here.sh

This script moves the contents of a given directory into its parent
directory, then removes this directory.
This is the version I created to integrate in ROX-Filer.
This commit is contained in:
Matteo Cypriani 2010-01-05 16:50:28 +01:00
parent b31ee9d058
commit 902511b64b
1 changed files with 12 additions and 0 deletions

12
mv_here/mv_here.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
if [ $# -ne 1 ] ; then
exit 1
fi
rep=$(dirname "$1")
cible=$(basename "$1")
cd "$rep"
mv "$cible"/* .
rmdir "$cible"