Error trap/detection question in sh
Douglas Siebert
dbert at mole.gnu.ai.mit.edu
Wed Apr 3 06:21:16 AEST 1991
I have written a script in sh using named pipes to perform an unattended ftp
session. I would like to insert some form of error checking/detection in it to
check for conditions such as "Network unreachable" and "Connection timed out"
etc. I am using a command of the form:
ftp -n [address] < pipe > outfile &
where "pipe" is a named pipe created by "mknod pipe p" I suppose I could add
something of the form 2>errorfile to trap errors and if the file is of positive
size assume something has occurred which I do not wish. I am hoping for a
cleaner, better way though. Any ideas?
--
________________________________________________________________________
Doug Siebert dbert at gnu.ai.mit.edu
MBA Student (2nd year)
The University of Iowa
More information about the Comp.unix.shell
mailing list