I was wondering if anyone can help me out with a Solaris 9, FTP problem.
The problem is this. One of our scripts recently attempted to send files to a MS server, using FTP, and some error occurred. Because the script didn't trap for errors we didn't know about the problem until things started failing down the line.
My task now is get the script to capture any errors that occur. Normally, I'd just grep for 'bytes sent' in the output file but, it appears as if the 'mput *' command doesn't give out that information.
Here's the snipet of code that does the FTP (server-name/user-id/password are changed):
--------------------
ftp -n server-name<<END-FTP > /tmp/$$soft1
user user-id password
cd dcview/routlist
lcd /work_str/circ/softbook/concat
prompt
mput *
quit
END-FTP
--------------------
When the FTP is successful the /tmp/$$soft1 file contains the following two lines:
Local directory now /work_str/circ/softbook/concat
Interactive mode off.
Now, at this point in the script I could grep the /tmp/$$soft1 file if I knew what I was looking for. Is there a list somewhere of all the possible errors that could occur
that I could grep for? An alternate solution, I suppose, would be some way to determine if these two lines were 'all' the file contains.
Any help would be greatly appreciated.