#!/bin/sh if test $# -lt 2 then echo "usage: `basename $0` [...]" \ " [<--> [...]]" 1>&2 exit 1 fi str="$1" shift dirs="" while test "x$1" != "x" do if test "x$1" == "x--" then shift break fi dirs="$dirs $1" shift done for i in $dirs do grep "$@" -- "$str" `find "$i" -type f -print` done