groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] poor man's wysiwyg for groff/gv


From: Ralph Corderoy
Subject: Re: [Groff] poor man's wysiwyg for groff/gv
Date: Tue, 18 Dec 2001 17:38:12 +0000

Hi Tadziu,

> # -- ps output is like "1308677 pts/19  S  0:00.38 gv test.ps" --
> # -- first item is PID, used in refresh function as $1 --
> # -- [0-9] matches time and is used to exclude the grep process --
> 
>   pid=`ps x | grep "[0-9] gv $post"`
>   refresh $pid

If you run a process in the background with an ampersand the shell puts
the process id in $!.

    $ sleep 42 &
    19857
    $ echo $!
    19857

This would save the mucking around with ps and grepping out grep.

Cheers,


Ralph.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]