Date: Fri, 01 Aug 2003 15:54:37 -0500 From: Peter Elsner <peter@servplex.com> To: freebsd-hackers@FreeBSD.ORG Subject: fetch command sending STDOUT to STDERR Message-ID: <5.2.0.9.2.20030801154605.011b2d50@mail.servplex.com>
next in thread | raw e-mail | index | archive | help
For some time now, I've been using FTP to transfer files from one server to another. I recently decided to update my script to use fetch instead of FTP. For some reason, the fetch command seems to be sending STDOUT messages to STDERR. I have a cron job that runs every 15 minutes and fetches some files, the output from STDIN is: 96 bytes transferred in 0.0 seconds (1.24 MBps) 249 bytes transferred in 0.0 seconds (2.70 MBps) However, I have the STDOUT redirected to a file name in /tmp report.out and STDERR redirected to a file name in /tmp report.err My script then checks to see if report.err is greater than 0 bytes. If it's not, the script exits cleanly (it should), if it is greater than 0 bytes, it sends me an email stating that the file transfer failed, and appends the report.err file. Here is my cron entry: */15 * * * * /home/reports/reports.sh >/tmp/reports.out 2>/tmp/reports.err For the time being, I've redirected STDERR to /dev/null which will stop the problem. However, if the transfer fails, I won't know about it either... Is this normal for fetch? Peter Peter Elsner <peter@servplex.com> Vice President Of Customer Service (And System Administrator) 1835 S. Carrier Parkway Grand Prairie, Texas 75051 (972) 263-2080 - Voice (972) 263-2082 - Fax (972) 489-4838 - Cell Phone
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.2.0.9.2.20030801154605.011b2d50>