> grep [c]ron will search for the regex "[c]ron", which will only match
> the string "cron".  The regex will not match the string "[c]ron".
> 
> String "[c]ron" is not the same as Regex "[c]ron".

#bash# grep '[c]ron'
cron
cron
grep cron
grep cron

So the 'grep cron'  is matched by the above command. So as per regular
expression
grep '[c]ron' and grep 'cron' are same. 

Oh and i got it that ps ax | grep '[c]ron' will search for 'cron' in
the ps output and thus the grep always used to show  only 'cron' when
ps ax | grep '[c]ron' is executed.
Only the ps output differs based on your command and thus it does not match.

I think this is wat you meant but i could get it only after some thinking!


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
linux-india-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to