How can I grep for lines that contains either the larger-than sign or the smaller-than sign in them?
The following grep command returns nothing:
grep "<\|>" sdiff.out
Grepping, however, for just one of the signs at a time does return data from the file. The file contains output from the sdiff command.
The purpose of all this is to see only the actual lines that differ between two files.
Thank you for any tips.
Use
-P
or-E
option in grep with><
symbols inside character class,OR
Example: