I have a problem with grep. I have a http://pastebin.com/HxAcciCa file that I want to check for specific templates. And when I try to find it, grep returns all the lines, provided that the template already exists in the given file.
To explain more, this is the code I'm running
grep -F "ENVIRO" "$file_pos" >> blah
No matter what else I try, even if I provide the whole line as a bash template, it always returns all the lines.
These are variations of what I'm trying:
grep -F "E20" "$file_pos" >> blah grep E20 "$file_pos" >> blah grep C:\E20-II\ENVIRO\SSNHapACS480.dll "$file_pos" >> blah grep -FC:\E20-II\ENVIRO\SSNHapACS480.dll "$file_pos" >> blah
Also, for some strange reason, when you add the -x option to grep, it does not return any string, despite the fact that there is an exact pattern.
I searched the web and bash documentation for this reason, but found nothing.
My last test was as follows
grep -F -C 1 "E20" "$store_pos" >> blah
I thought that maybe it was printing lines after the result, but it wasnβt. I used the blah file to see the result. I also use Linux mint rebecca. Finally, although the naming is pretty familiar, this question is not like Why grep matches all the lines for the pattern "\ '"
And finally, I would like to say that I am new to bash. I suspect that the error may be related to the main file http://pastebin.com/HxAcciCa , and not to the code?