[NCLUG] Bashing lost children
Tkil
tkil at scrye.com
Tue Apr 9 17:29:12 MDT 2002
>>>>> "Michael" == Michael Dwyer <mdwyer at sixthdimension.com> writes:
Michael> Okay, so you know how the shell variable $$ stands for the
Michael> PID of the shell? Great. Now, what if you want to keep
Michael> track of the PID of a process that the shell spawns.
info '(bash)Special Parameters':
| `!'
| Expands to the process ID of the most recently executed
| background (asynchronous) command.
so:
| $ sleep 20 &
| [1] 8402
| $ echo $!
| 8402
t.
More information about the NCLUG
mailing list