#! bin/bash
# Script for case sensitive
# Script for case sensitive
[prabhucloudxlab@cxln4 ~]$ cat>hello.sh
echo " enter filename is search text from "
read filename
echo " enter filename is search text from "
read filename
if [[ -f $filename ]]
then
echo "enter the text1 to search"
read grepvar1
grep $grepvar1 $filename
echo "enter the text2 to search"
read grepvar2
grep -i $grepvar2 $filename
else
echo "$filename does not exist"
fi
[prabhucloudxlab@cxln4 ~]$ sh hello.sh
enter filename is search text from
filegrep.txt
enter the text1 to search
linux
This is linux
This is linux
This is linux
This is linux
This is linux
This is linux
This is linux
This is linux
enter the text2 to search
Linux
This is linux
This is linux
This is linux
This is linux
This is linux
This is linux
This is linux
This is linux