#! /bin/bash

pattern="$1"; shift

files=`grep -l "$pattern" $*`
if test "$files"
then
	vi $files
else
	echo "$0: nothing matched $pattern"
fi
