[prog] [Bash] script question
terri at zone12.com
Sun Sep 29 15:46:54 EST 2002
> for file in $maildir
As others have mentioned, this should probably be something along the lines
of 'for file in $maildir/*'
> mv $file $file-$datestamp
> touch $file
The only other thing I see, offhand, is that if you keep moving these files
like this, you'll end up with filenames like
after you've run this in consecutive months.
How you avoid this is personal choice, but I'd probably make an archive
directory and do something like this:
for file in $maildir/*
mv $file $archivedir/$file-$datestamp
With the appropriate change to the tar command.
More information about the Programming