blodwyn
IS-IT--Management
- Mar 23, 2001
- 24
I need to write a script that will automatically delete files in a set directory (dir1) on our ftp server if the files have ben downloaded.
Once downloaded, details of the files are contained in the ftp log file and I have extracted their names using awk, into a file (file1)
I can then do:-
# for x in `ls dir1`
> do
> grep $x file1
> done
which will give me the required file names (ie those appearing in both)
How can I add a command that will carry on and delete these files?
Once downloaded, details of the files are contained in the ftp log file and I have extracted their names using awk, into a file (file1)
I can then do:-
# for x in `ls dir1`
> do
> grep $x file1
> done
which will give me the required file names (ie those appearing in both)
How can I add a command that will carry on and delete these files?