#! /bin/sh

# readloop is supposed to read from standard input a word and a file name
# in which to look for the word.

# Read two words from a line
echo "Enter a word and a file name to look in:"
read arg1 arg2

# Keep going until $arg1 doesn't contain anthing 

while [ "$arg1" != "" ]  
do
    echo "Looking for \"$arg1\" in file $arg2:"
    grep $arg1 $arg2
    echo --------------------

    echo "Enter a word and a file name to look in:"
    read arg1 $arg2
done
