Checking for the existence of files against a list

view full story

http://unix.stackexchange.com – I have a "command" text file that issues a data file download command on each line. I send the command file to bash. However, a small percentage of the downloads fail. Here is the algorithm I use to find out what's missing: After downloading, I go back through the command file and check if each download file exists. If the download doesn't exist, I copy the command line into a new command file. I am left with a new command file for the remaining downloads. Here is the bash script I implemented the algorithm with: 1 #!/bin/bash 2 while read line 3 do 4 for item in $ (HowTos)