$ ff() { local IFS=’|'; grep -rinE “$*” . ; }
Grep will read the contents of each file in PWD and will use the REs $1 $2 … $n to match the contents.
In case of match, grep will print the appropriate file, line number and the matching line.
It’s just easier to write
ff word1 word2 word3
Instead of
grep -rinE ‘word1|word2|word3′ .
View this command to comment, vote or add to favourites
View all commands by RanyAlbeg

by David Winterbottom (codeinthehole.com)






















0 Comments
You can be the first one to leave a comment.