Not sure why you should need cron for your task, but this should run under it as well. Make sure it is run by bash! Replace your if construct with
Be aware that you need to check for the error files in every loop. Check the mail stuff and adapt to your system.
I am using the following code in a C Shell script to transfer files to a remote server:
ftp -n logxx.xxxx.xxx.xxx.com <<DO_FTP1
quote user $user_name
quote pass $password
ascii
put $js_file_name
bin
put $FinalZipFile
quit
DO_FTP1
This code works great except on those rare occasions... (8 Replies)
I need to read a file line by line, then depending on the contents of each line, type in a code that will get written to an array.
The problem I have is when I ask the user to confirm the input code, if it is wrong, how do i Return to ask again?
Any thing I try increments the file to the next... (6 Replies)