I have a problem with bash, I'm trying to detect strings in a file with bash with the file looking like
cnlog "Hello World!"
When i try the [ $variable = *" ]
in bash it doesn't work and throws out an error
basilc.sh: line 13: unexpected EOF while looking for matching `"'
basilc.sh: line 16: syntax error: unexpected end of file
the code of the bash file is
char=""
while IFS='' read -n1 c; do
if [ $char = '"' ] || [ $char = *" ]
then
echo "STRING FOUND"
char=""
pwd
fi
echo "$char"
done < $1
Please help