Hi,

very good idea for Keith's script!

> if ps ax | grep r\\sync.*$VAULTPATH > /dev/null ; then
>
>
> OK...well I'm off to do other things.  I *STILL* haven't found WHY  
> that
> grep statement works!


The trick here is: the shell will replace "\\" with "\" - "\" escapes  
the next character

So the process "grep" will have "r\sync" as it`s parameter. Nothing  
special so far.
"grep" itself always uses regular expression for its matching. So it  
looks for "rsync" in the processlist, because the "\" only escapes the  
next character, in this case the "s" - and so greps command line will  
NOT match.


With best regards,

Dirk Melchers
/// IT/Software-Entwicklung ///

-- 
NUREG GmbH ///
Dorfäckerstraße 31 | 90427 Nürnberg | Germany
Tel. +49-911-32002-256 | Fax +49-911-32002-299
Mobil +49-172-9354670 | www.nureg.de
Nürnberg HRB 22653 | USt.ID DE 814 685 653
Geschäftsführer: Michael Schmidt, Stefan Boas



_______________________________________________
Dirvish mailing list
[email protected]
http://www.dirvish.org/mailman/listinfo/dirvish

Reply via email to