开发者

How can I find files within a directory containing paths to /bin but not shbangs?

I want find all files inside of a directory that make a call to /bin exe开发者_Go百科cutable, but I do not want to include shbangs, like so:

#!/usr/bin/perl
#!/bin/bash

All other files containing the path should be listed and show the code making the call.


Or with only 2 greps:

grep -r /bin * | grep -Pv '.*?:#!'


Give this a try:

$ grep -H -r '.*' *|grep -v '^#!'|grep /bin/
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜