Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there some Unix util that will allow me to grep multiple files with little typing?

Tags:

text

grep

find

unix

Right now I do this a lot:

find * | grep py$ | xargs grep foo

I recall there is some util that does this with way less typing, but which?

UPDATE: I prefer to use the Bash shell if possible.

like image 741
Johan Kotlinski Avatar asked Jun 22 '09 16:06

Johan Kotlinski


1 Answers

I love ack:

Which would you rather type?

$ grep pattern $(find . -type f | grep -v '\.svn')

$ ack pattern

like image 91
dfa Avatar answered Oct 02 '22 09:10

dfa