[techtalk] Really lame question
Chris J/#6
sixie at nccnet.co.uk
Fri May 5 21:02:34 EST 2000
>
> Hi, grrls ;-)
>
> I have a really _basic_ and lame question!
> I need to lauch two programs, and they need
> to behave like this;
>
> * start program 1
> * start program 2
> * use program 2
> * exit program 2 manually
> * program 1 should exit automatically
>
#!/bin/sh
program1 &
prog=$!
program2
kill $prog
Should do the job :) The $! returns the pid of the last process started,
which is often handy when combined with 'wait' or 'kill' :)
Chris...
--
@}-,'-------------------------------------------------- Chris Johnson --'-{@
/ "(it is) crucial that we learn the difference / sixie at nccnet.co.uk \
/ between Sex and Gender. Therein lies the key / \
/ to our freedom" -- LB / www.nccnet.co.uk/~sixie \
More information about the Techtalk
mailing list