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, Ulrich Petri (UP) wrote:

UP> Guido Fiala wrote:
UP> >
UP> > > if ps -A | grep [w]hatever > /dev/null 2>&1 ; then
UP> >
UP> > does'nt this give always true, as the the grep returns the
UP> > line of this
UP> > commandline itself?
UP> >
UP>
UP> This is why i wrote "[w]hatever". The square brackets (which are also
UP> shown in the output of ps) prevent grep from finding itself (since the
UP> regexp [w]hatever doesn't match itself).

Nice. A very elegant solution!


        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