On Saturday 26 Jun 2010, Ashish SHUKLA wrote:
> Mohit Singh writes:
> > Need some help. On an embedded system being minimalistic 'grep -w'
> > does not work. Please let me know if somebody can emulate the
> > behavior by using some other tool.
> 
> NONWORD='[^[:alpha:][:digit:]-]'
> grep "\(^\|${NONWORD}\)${PATTERN}\(${NONWORD}\|\$\)" $*
> 
> This should work with grep supporting basic regexp.

Could this be made simpler using the ? operator?

-- Raju
-- 
Raj Mathur                r...@kandalaya.org      http://kandalaya.org/
       GPG: 78D4 FC67 367F 40E2 0DD5  0FEF C968 D0EF CC68 D17F
PsyTrance & Chill: http://schizoid.in/   ||   It is the mind that moves

_______________________________________________
Ilugd mailing list
Ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd

Reply via email to