using <B>Bourne shell</B> how can I list all files in such a directory that file name don't match a pattern.
a dir. /mydir contains these files
I want to move all files except the files of 25th of the month (which is today files) and rename the files by adding a string to the begining of the file name.
so here what I did:
#!/usr/bin/sh dir=/var/dist cd /mydir for file in *.log do if [ -f $file ] then if /usr/bin/mv $file $dir/access_log_$file then echo "$file : moved to $dir successfuly " else echo "can not move or rename access_log_$file" fi fi done
how can I exclude moving today log files from the dir /mydir ?
[Edited by tamer on 01-28-2001 at 05:42 PM]
added code tags for readability --oombera