Mailing List archive

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

[vdr] Re: Feature Request: SVDRP command "DONTSLEEP"



On Thu, 20 Nov 2003, Guido Fiala (GF) wrote:

GF> > if ps -A | grep [w]hatever > /dev/null 2>&1 ; then
GF>
GF> does'nt this give always true, as the the grep returns the line of this
GF> commandline itself?
GF>
GF> usually a
GF>
GF> ps -A | grep "^whatever"
GF>
GF> should be better (whatever then needs to be at the beginning of the
GF> commandline)
GF>
GF> or
GF>
GF> ps -A | grep "whatever" | grep -v "^grep"
GF>
GF> filters out the unwanted line containing grep... jm2c

just use
   pgrep whatever

(look into man page for further options)

c ya
        Sergei
-- 
--------------------------------------------------------------------  -?)
         eMail:       Sergei.Haller@math.uni-giessen.de               /\\
-------------------------------------------------------------------- _\_V
Be careful of reading health books, you might die of a misprint.
                -- Mark Twain



-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index