From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,95c40c05d0de87d5,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-11-18 09:13:03 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!gatech!taco.cc.ncsu.edu!news From: Eric Lease Morgan Newsgroups: comp.unix.osf.osf1 Subject: redirecting STDERR and crontab scripts Date: 18 Nov 1994 15:47:07 GMT Organization: North Carolina State University Message-ID: <3aii9r$dt3@taco.cc.ncsu.edu> NNTP-Posting-Host: emorgan.lib.ncsu.edu How do I redirect STDERR in crontab scripts? I have the following crontab script: 30 3 * * * /bin/csh /usr/local/wais/bin/index all >& /usr/users/Eric/index.log This script is intended to reindex my WAIS server data. As you may or may not know, the WAIS indexer creates *voluminous* output. Since I use the csh, the command: /usr/local/wais/bin/index all >& /usr/users/Eric/index.log works great from my command line. But when I run this script from my crontab file, root reports an error: sh: /usr/users/Eric/index.log: bad number If I change my crontab script to: 30 3 * * * /bin/csh /usr/local/wais/bin/index all >& 2 I get a HUGE file in my mailbox. How do I run a crontab script and redirect the STDERR to a file in my directory, without getting anything sent to my mailbox? Eric Lease Morgan NCSU Libraries eric_morgan@ncsu.edu http://www.lib.ncsu.edu/staff/morgan/