#find + egrep
Command of the Day:
If you see my previous couple of post you would be comfortable to use “egrep” and “find” utilities.
Here One Question arises on me:
How would you combine both commands like you need to find some file in your disk also you have find the string from that file:
my thoughts:
find . -name “nava.txt” | egrep -in “NAVANEETHAN”
Is it correct? Why it is not correct?
find . -name “nava.txt” -exec egrep “NAVANEETHAN” {} \;
(or)
find . -name “nava.txt” -print0 | xargs -0 egrep “NAVANEETHAN” refer
Advertisement

