batch command for AT&T UNIX PC 7300
garcia
amg22 at aluxz.UUCP
Tue Dec 10 04:12:43 AEST 1985
I ran across the following shell script which does a nice job
of providing the much missed batch command on the AT&T UNIX PC. The
original file (below the cut line) is pretty much self explanatory.
I hope others find it as useful as I do. I would also be
interested in any feedback on this file or the availability of other
goodies for the PC 7300.
Gus Garcia
AT&T Bell Laboratories
555 Union Blvd
Allentown, PA 18103
aluxz!amg22
------------------------- Cut along this line -------------------------
#........................................................................
#: :
#: batch -- Run a background shell script independent of login status. :
#: Copyright 1985 by G.R.A.M. Associates - For the Public Domain :
#: :
#: Usage: batch [-] [file ...] :
#: where: file is 0 or more files containing shell :
#: scripts :
#: - indicates standard input. :
#: :
#: Files: $HOME/mmddhhmmss (temporary file removed after use) :
#: :
#: G.R.A.M. Associates assumes no responsibility for any use or misuse :
#: of this program. Please don't remove this header. :
#:......................................................................:
FILE=$HOME/`date '+%m%d%H%M%S'` # Make a unique file name
( cat $* ; echo rm -f $FILE ) > $FILE # Need a separate process for input
nohup sh -c "sh $FILE 2>&1 | mail $LOGNAME" 2>&1 >/dev/null & # Run it
echo batch: Executing $FILE # Let 'em know its running
More information about the Comp.sources.unix
mailing list