The following should do approximately what you want:
$ i=1
$ for f in `ls | sort`
> do
> mv $f text${i}.txt
> i=`expr $i + 1`
> done
'man bash', 'man sort', and 'man expr' should give you some more
insight into what these commands do.
Marc
--
Marc Mongeon <[EMAIL PROTECTED]>
Unix Specia
hi
is there any way to sort and name the
files in a directory?
for example...the files are all
called like they have been downloaded...
now i want them to be like
"text01.txt" "text02.txt" etc...
how can i do that?
thx
Alexander P.
Barkey
2 matches
Mail list logo