W.A.S.S to find a particular pattern from the file.
echo -e "Enter the pattern : \c"
read ptrn
echo -e "Enter the file name : \c"
read fname
grep -E $ptrn $fname
Output
sh findp.sh
Enter the pattern : drw*
Enter the file name : temp3.txt
drwx------ 3 root root 1024 May 12 2005 Desktop
drwx------ 2 root root 1024 Sep 19 00:06 mail
drwxr-xr-x 2 root root 1024 Nov 23 23:24 narendra