error redirection in boot csh scripts

YATES, JOHN H. YATES at C.CHEM.UPENN.EDU
Fri Feb 1 05:51:00 AEST 1991


I want to have a csh script fired up at boot time that redirects its error
output to /dev/null. It runs every 30 seconds as long as the machine is up.

If I create the file
/etc/rc2.d/S99printadd containing the one line:

/usr/local/source/llpr/printit >& /dev/null &

it gives: /dev/null: bad number when I manually invoke it from root.

It works if I only redirect std output, but the error output keeps coming to
the screen, not an acceptible compromise.

I tried:
/usr/local/source/llpr/printit >\& /dev/null &
but the error messages still come to the terminal.

I also wonder if invoking it from root under csh will
be the same as its invocation at boot time (under sh?).
If manual invocation works, I'll try it at the next reboot (which I can't
do very often!).

How can I get this fired up at boot time, and never see the error messages?

Thanks, John
yates at c.chem.upenn.edu

In case it helps, this is the basic envelope of the printit csh script:

#! /bin/csh -f
# printit
#
set LLPRDIR = /u0/jy/llpr
          ...
while(1)
          ...
     echo "aprint $names[1]"
     echo "Sleep $delay seconds."
     sleep $delay
end



More information about the Comp.sys.sgi mailing list