I have this script in bash:
#!/bin/bash
for (( i=1; i <= 5; i++ ))
do
glxgears &> /tmp/log 2>&1 &
done
killall glxgears
but always at the end of the script I get this:
./script.sh: line 5: 2973 Terminated glxgears &> /tmp/log 2>&1
./script.sh: line 5: 3003 Terminated glxgears &> /tmp/log 2>&1
I tried to suppress the messages in different ways, like:
killall glxgears 2> /dev/null
killall glxgears &> /dev/null
killall glxgears > /dev/null 2>&1 &
and always I get the messages. I think that these messages come from job control, so i tried as well: jobs 2>&1 >/dev/null
, but it does not work. So, the question here is how can I remove these messages after my script finished?