how to grep for the whole word

Posted by josh on Stack Overflow See other posts from Stack Overflow or by josh
Published on 2010-05-21T01:41:49Z Indexed on 2010/05/21 1:50 UTC
Read the original article Hit count: 279

Filed under:
|

I am using the following command to grep stuff in subdirs

find . | xargs grep -s 's:text'

However, this also finds stuff like <s:textfield name="sdfsf"...../>

What can I do to avoid that so it just finds stuff like <s:text name="sdfsdf"/>

OR for that matter....also finds <s:text somethingElse="lkjkj" name="lkkj"

basically s:text and name should be on same line....

© Stack Overflow or respective owner

Related posts about grep

Related posts about unix