Thursday, September 22, 2011

How to use grep to search within a particular file type

Example finding sort in python files. 3 options:
grep -r --include=*.py "sort" /home/vlad/work
find . -name "*.py" -print0 | xargs -0 grep "sort"
findstr /pinsc:"sort" *.py

No comments:

Post a Comment

Checking font availability on Mac   fc-list : family | grep "Fira Code"   or   system_profiler -json SPFontsDataType | grep \...