批量查找文件内的字符串,并输出结果的行号,可以这样find . -name “*.foo” | xargs grep -n -s ‘bar’或者grep -n -s ‘bar’ `find . -name “*.foo”`

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.