Try crontab -l |egrep -i "(shut|init|sync|reb)"

----- Original Message -----
From: "Rajesh M." <munikur / gmail.com>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Friday, December 10, 2010 7:58:35 PM
Subject: Regular expression help

Hi list,

I need help in putting a regular expression, regular expression should
find either of these four words:

shut reb sync init

I am trying to find either shutdown or reboot or sync or init, for Linux
it works fine if I put crontab -l |grep -iP "(shut|init|sync|reb)" but
in Solaris it is failing because it doesn't have regular expression
option which is -P.

So I am trying to make this through regular expression.



Thanks in advance

-- 
Posted via http://www.ruby-forum.com/.