How to suppress "Terminated..." message after kill

2006-09-20 Thread Com MN PG P E B Consultant 3
My bash program basically does:

  tail -f file >outfile &
  killpid=$!
  ...
  kill $killpid >/dev/null 2>&1
  ...

Still I get the message

   (PID) Terminated  tail -f file >outfile

at the end of my script.

Is there a way to suppress this message? (bash 2.05b)

Ronald
-- 
Ronald Fischer (phone +49-89-63676431)
mailto:[EMAIL PROTECTED]


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Re: How to suppress "Terminated..." message after kill

2006-09-20 Thread Bob Proulx
Com MN PG P E B Consultant 3 wrote:
>    (PID) Terminated  tail -f file >outfile
> Is there a way to suppress this message? (bash 2.05b)

Use:
  set +m

Or:
  set +o monitor

  -m  Monitor  mode.   Job control is enabled.  This option is
  on by default for interactive  shells  on  systems  that
  support  it  (see  JOB  CONTROL above).  Background pro-
  cesses run in a separate process group and a  line  con-
  taining  their exit status is printed upon their comple-
  tion.

Why is monitor set for your script?  That would only be typical for
interactive shells but not typical for scripts.  Figure out why
monitor mode is enabled for your script and you will have the answer
to both this problem and others that you have not noticed yet.

Bob


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash