/ Published in: Bash
Search many files for a string. This example finds the string "thingy." This is useful when I want to find, say, a CSS class name that has changed, and update it in all of my .js, .jsp and .jspf files.
The -niP argument to grep is optional. -n prints line numbers, -i makes search case-insensitive, and -P toggles Perl regular expression syntax. (I'm not sure that -P works under Cygwin.)
Expand |
Embed | Plain Text
find \( -name "*js" -o -name "*jsp" -o -name "*jspf" \) | xargs grep -niP 'thingy'
You need to login to post a comment.
