#!/bin/sh
#
# greppy
#
# Usage:   greppy  string
#
# This script will search all text files in current directory, for
# the 'string' entered as argument.  It will ignore case.
#
# By:  Angel Corbera, TSID1, Refinery Isla, Curacao
#
TF=`file *|awk '$0~/text/ || $0~/script/ {print substr ($1,1,length($1)-1)}'`
for x in $TF
do
echo "Searching on $x ..."
egrep -i $1 $x /dev/null
done
1