I have a BASH script that creates a directory of the current date, downloads files via psftp into that current date directory, then creates a text file of the list of files in that current date directory via this command:
ls *.bak > $DATE.list
My $DATE. list text file, for example 20071012.list, looks like this:
Now what I need to do is create another text file called $DATE.del which will add the command 'del' to the beginning of each like in the 20071012.list file and place 'quit' at the last line, for example 20071012.del would look like this:
This has pushed my knowledge of BASH to its limit and I would appreciate any direction on this script.