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
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?