Unwanted output
Larry Wall
lwall at jpl-devvax.JPL.NASA.GOV
Fri Mar 2 18:32:53 AEST 1990
In article <1990Mar1.234155.15705 at sun.soe.clarkson.edu> elmo at spock.adm.clarkson.edu (Paul B. Davidson,ERCTERM,2682292,2862026) writes:
: Ok, a quick, and probably simple question for you UN*X ppl out there:
: I'm writing a short csh script that parses the command line, then
: invokes a utility with the parsed command line.
: The script backrounds the utility, and exits.
: The problem is that when it backrounds (splatutil &), csh prints the job
: and process numbers of the backround process, something that I do not
: want to appear.
If you just want to keep the output hooked to the terminal, you can say
(command >/dev/tty &) >/dev/null
If you want to be able to redirect the output of your script you'll have
to get a little fancier. One could go wild with redirections in sh, but
here's the perl way:
perl -e 'fork || exec "command";'
Larry Wall
lwall at jpl-devvax.jpl.nasa.gov
More information about the Comp.unix.questions
mailing list