Makefile: add pickrand
[cmccabe-bin] / head_grep.sh
1 #!/usr/bin/env bash
2
3 #
4 # Grep the first few lines of a file.
5 # Print out any matches if they are found, along with the file name.
6 #
7 # Colin McCabe
8 #
9
10 find -type f | while read F; do
11   if head -n 50 $F | grep -q ${@}; then
12     echo -n "${F}: "
13     grep ${@} $F
14   fi
15 done