#! /bin/sh
# A script reads a pattern name & file name from a user
& displays the pattern that is matched into a file onto a screen.
echo ”Enter the pattern name to be searched”
read pattern
printf ”The entered pattern name is %s /n ” $pattern
echo "Entered file name "
read file
printf "The entered name of the file is %s /n " $file
grep $pattern $file



0 comments:
Post a Comment