#!/bin/sh
#   ges pattern... 
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# Run grep against all the source files, and edit each of the matched  files. #
# For  vi,  the  "+" option will position the cursor at the first instance of #
# the pattern.  With more than one pattern, this isn't too well defined;  the #
# last pattern will be the one found.                                         #
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
if [ ! -n "$EDITOR" ];then EDITOR=vi; fi
F="*.[bh]"
L=""
for P
do	l=`grep -l "$P" $F`
	L="$L $l"
done
$EDITOR "+/$P/" $L
