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/
精彩评论