would like to suppress the output of pkill on a background process
3
votes
2
answers
2063
views
I have a shell-script in which I do an
iostat -c 1 > data.cpu. &
Later in the script, after I've collected the data I'm interested in, I do a
pkill iostat
which kills iostat and allows me to continue by processing data.cpu and generating a report written to stdout. Part of the report includes
+ Terminated iostat -c 1 > data.cpu
produced by the pkill. For aesthetic reasons I would like to prevent the "Terminated" message from appearing. I tried various redirects, but so far I haven't succeeded.
Is there any way to prevent this part of the output?
Asked by Richard Gostanian
(345 rep)
May 15, 2020, 04:31 PM
Last activity: May 17, 2020, 12:23 AM
Last activity: May 17, 2020, 12:23 AM