On 2/24/06, Dan Uscatu <[EMAIL PROTECTED]> wrote:
> intr-un script, am nevoie sa pornesc o comanda in background, sa execut
> apoi ceva, iar mai tirziu sa omor respectiva comanda.
> cum ii preiau pid-ul sau job id-ul, sau cum o pornesc ca sa se omoare
> singura cind se termina scriptul ?
>
> multumesc
>
> "Live to Win, Dare to Fail !"
>

Man bash, pe la linia 2100 si ceva:

       There are a number of ways to refer to a job  in  the  shell.  
The  character  %
       introduces a job name.  Job number n may be referred to as %n. 
A job may also be
       referred to using a prefix of the name used to start it,  or 
using  a  substring
       that  appears  in its command line.  For example, %ce refers to
a stopped ce job.
       If a prefix matches more than one job, bash reports an error. 
Using %?ce, on the
       other  hand,  refers to any job containing the string ce in its
command line.  If
       the substring matches more than one job, bash reports an error.
 The  symbols  %%
       and  %+  refer  to  the  shell's notion of the current job,
which is the last job
       stopped while it was in the foreground or started in the
background.  The  previ-
       ous job may be referenced using %-.  In output pertaining to
jobs (e.g., the out-
       put of the jobs command), the current job is always flagged
with  a  +,  and  the
       previous  job with a -.  A single % (with no accompanying job
specification) also
       refers to the current job.

Satisfied?

Petre.

_______________________________________________
RLUG mailing list
RLUG@lists.lug.ro
http://lists.lug.ro/mailman/listinfo/rlug

Raspunde prin e-mail lui