Thanks IKON....... actually i just figured out what grep is doing.....its not the fault of grep
I have a file where 19224 lines are there with lines like (giving a snapshot)
1 1 1 2
2 2 2 3
3 3 3 4
In the file where I have mentioned all the patterns using which I need to remove selected lines containing these patterns, I have mentioned
77 78
in order to remove the line where the 3rd and 4th columns are 77 and 78.
The line which I wanted to remove looks like
81 5 77 78
But in the process, GREP is removing the following lines apart from the one (mentioned above) that I wanted to remove.
8373 9 78
77 7878
8374 9 78
77 7879
8375 9 78
77 7880
Because its finding 77 and 78 next to each other according to my pattern, its removing these lines. Is there a better way to tackle this problem rather than mentioning the entire line as "81 5 77 78" in my pattern matching file?