dircurse.sh

This commit is contained in:
Colin Davis 2011-08-06 05:51:06 +00:00
parent f010c23064
commit 73d8f59be7

20
dircurse.sh Executable file
View File

@ -0,0 +1,20 @@
function dircurse()
{
count=0
cd $1
for i in `ls -U`
do
echo mv $i $count#$i
count=`expr $count + 1`
if [ -d $i ]
then
dircurse $i
fi
done
}
if [ $? -lt 1 ]
then
echo "Usage: $0 directory"
fi
dircurse $1