[Techtalk] Shell script to send user defined signal to a process
Stratis Aftousmis
stratus at ccsi.com
Fri Sep 19 10:08:37 EST 2003
I made a mistake:
#!/bin/bash
test & kill $! #'!' expand's to the PID of the last
exit 1 #program run. The '&' run's the process
#in the background, use '&' instead of
#'&&'.
This program will run in the background and allow you to kill it in the
foreground.
A good way to test it on the command line is:
find / -name services <enter>
find / -name services & kill $! <enter>
It will run a few second's before kill kill's it.
--
www.ccsi.com/~stratus
stratus at ccsi.com
"What is complex to one, is not to another."
~In the beginning there was the command line: by Neal Stephenson
More information about the Techtalk
mailing list