#!/bin/sh
#	ge pattern file...
# Run egrep, and edit each of the matched files.  For vi, the "+" option
# will position the cursor at the first instance of the pattern.
#
if [ ! -n "$EDITOR" ];then EDITOR=vim; fi

P="$1"
shift
$EDITOR "+/$P/" `egrep -il "$P" $*`
