d***@gmail.com
2007-08-23 15:09:12 UTC
Hi all,
Probably a stupid question, but I have been searching for an answer
for quite some time.
I have a bash script, in which I create a process that runs in the
background, and that needs to be killed at a certain point in this
script. However, I do not want to get a message in my terminal about
the killing of this process.
Let me show you what I do right now:
# Create the process running in the background (i.e. make sure
everything that arrives on /dev/ttyS1 is printed on stdout
cat /dev/ttyS1 &
PID=$!
# Do some other stuff
...
# Kill the cat-process
kill $PID
If I run this script, I get the following output:
./name_of_the_script: line line_of_kill_instructiong: <processID>
Killed cat /dev/ttyS1
As my script has the intention of showing some information in a nice
way on stdout, this output disturbs that intention.
Thanks in advance for all help,
Dirk
Probably a stupid question, but I have been searching for an answer
for quite some time.
I have a bash script, in which I create a process that runs in the
background, and that needs to be killed at a certain point in this
script. However, I do not want to get a message in my terminal about
the killing of this process.
Let me show you what I do right now:
# Create the process running in the background (i.e. make sure
everything that arrives on /dev/ttyS1 is printed on stdout
cat /dev/ttyS1 &
PID=$!
# Do some other stuff
...
# Kill the cat-process
kill $PID
If I run this script, I get the following output:
./name_of_the_script: line line_of_kill_instructiong: <processID>
Killed cat /dev/ttyS1
As my script has the intention of showing some information in a nice
way on stdout, this output disturbs that intention.
Thanks in advance for all help,
Dirk