Shell scripts waiting for foreground

Ken Turkowski ken at turtlevax.UUCP
Wed Apr 17 06:30:36 AEST 1985


I would like to write a shell script that dumps its standard input to a
file, then cats the file when the end-of-input has been found.  It will
do this as long as the program is running in the foreground.  If in the
background, it will print out a short message, then wait to come to the
foreground before it prints the file.

Can this be done with either sh or csh?  Or do I need to write a C
program?  I am running 4.2bsd.
-- 

Ken Turkowski @ CADLINC, Menlo Park, CA
UUCP: {amd,decwrl,hplabs,nsc,seismo,spar}!turtlevax!ken
ARPA: turtlevax!ken at DECWRL.ARPA



More information about the Comp.unix.wizards mailing list