Newsgroups: comp.unix.shell
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!mintaka!mole.gnu.ai.mit.edu!dbert
From: dbert@mole.gnu.ai.mit.edu (Douglas Siebert)
Subject: Error trap/detection question in sh
Message-ID: <1991Apr2.202116.15411@mintaka.lcs.mit.edu>
Sender: daemon@mintaka.lcs.mit.edu (Lucifer Maleficius)
Organization: The Internet
Date: Tue, 2 Apr 91 20:21:16 GMT
Lines: 16

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@gnu.ai.mit.edu
MBA Student (2nd year)
The University of Iowa
