Skip to main content
2 of 11
added 109 characters in body
toom501
  • 205
  • 4
  • 10

Hide the stdout from a bash script

I don't know if this is the right place to ask this kind of question, but I will ask it anyway:

I have a daemon script that is suppose to stop and recover the process to run in the background:

process_id=`ps -eaf | grep -i daemon | grep -v grep | grep -v status | grep -v stop | awk '{print $2}'`
(kill -STOP $process_id) &
... # do something else 
(kill -CONT $process_id) &

This is working fine , but then in the STDOUT this appears:

[1]  +  8545 Suspended (signal)            /etc/init.d/...

How can I hide that STDOUT?

toom501
  • 205
  • 4
  • 10