what i'm trying is, reading all the strings from one file which also include special characters ie. ,/\'" etc. and i'm doing cat of one file with grep above string to check occurrence but it's not working for some special strings.
file1.txt
Error:'abcd' not found; Try Again
Error:load() loading provider library version 3.5(r182) By <info@xyz.com>
Warning: Connection to group 'xyz-xyz'
Filename.log
2017-06-19 06:50:28 Error:'abcd' not found; Try Again
2017-06-19 06:50:28 Error:load() loading provider library version 3.5(r182) By <info@xyz.com>
2017-06-19 06:50:28 Warning: Connection to group 'xyz-xyz', peer '00.00.01.01:2200,00.00.01.01:2200,00.00.01.01:2200'
inside script test1.sh
while read STRING
do
cat Filename.log | grep -i -F "$STRING"
done<file1.txt
but it reads it as
grep -i -F 'Error:'\''abcd'\'' not found; Try Again'
And does not show any correct output.
So how can we ignore all the special characters inside this ? Other strings without any special characters are working fine.
Thanks