My last grep statement is not working?
Script_Dir-"/home/andy/bin/"
read -p "Enter text to search for : " n1
#grep -i $n1 /home/andy/bin/*.sh # -i MEANS CASE INSENSITIVE
grep -i $n1 $Script_Dir*.sh
My last grep statement is not working?
Script_Dir-"/home/andy/bin/"
read -p "Enter text to search for : " n1
#grep -i $n1 /home/andy/bin/*.sh # -i MEANS CASE INSENSITIVE
grep -i $n1 $Script_Dir*.sh
Hello,
This is working well for me.
The only trouble I had was with the first line Script_Dir-
with Script_Dir=
Script_Dir="/home/andy/bin/"
Grep will report an error grep: $Script_Dir/*.sh: No such file or directory
if there is no .sh
file in your folder.
Kr,
Thanks.
I did not notice the - instead of =.