question on csh

v.wales at ucla-locus v.wales at ucla-locus
Tue Oct 4 05:00:32 AEST 1983


From:            Rich Wales <v.wales at ucla-locus>

	Can anyone tell me how to supress the

			[1] [12345]
			[1] +Done

	messages when running a program in the background from a csh
	script?

I don't know any way to tell /bin/csh not to produce the above output,
but you can throw said noise away by enclosing the background command
in parentheses (causing it to be executed by a subshell), then adding
">& /dev/null" to it (causing the error output from said subshell to
be discarded).

For example, instead of:      blah &
say the following:            (blah &) >& /dev/null

Note that the background symbol ("&") must be INSIDE the parentheses.

The redirection to /dev/null will NOT affect the output of the command
itself, by the way -- all it will do is discard the messages produced
by the subshell itself.

	The noise seems to be lower when using "sh" in the non-
	interactive mode.

/bin/sh spits out the process ID when you fork a background process,
but it doesn't inform you when the process terminates.



More information about the Comp.unix.wizards mailing list