gringomike
Technical User
Hi all,
Can anybody tell me why the script beloew does not work?
for file in `ls -1 /tmp/test`
do
if [ $file = string1.* ]
then
mv /tmp/test/$file /tmp/test/$file.ARCHIVE
else
mv /tmp/test/$file /tmp/test/$file.PROCESS
fi
done
It names every file in the directory *.PROCESS despite the presence of the "string1.12345" and "string198765" files.
Thanks in advance!
GM
Can anybody tell me why the script beloew does not work?
for file in `ls -1 /tmp/test`
do
if [ $file = string1.* ]
then
mv /tmp/test/$file /tmp/test/$file.ARCHIVE
else
mv /tmp/test/$file /tmp/test/$file.PROCESS
fi
done
It names every file in the directory *.PROCESS despite the presence of the "string1.12345" and "string198765" files.
Thanks in advance!
GM