For example: I am grepping "Hello" from a file and there are 10 matches. So all ten lines with match will get stored into a variable($match). Now I want to ignore those lines which have "Hi" present in that.
Currently I tried this:
match = grep "Hello" file | grep -v "Hi" file
But that's not working properly