You have to use grep -E
or egrep
:
grep -E '<Line: (429|6854)>' filename.text
Frage
I tried the following commands
cat filename.txt | grep "<Line: (429|6854)>"
cat filename.txt | grep "<Line: \(429\|6854\)>"
to show the lines containing <Line: 429> or <Line: 6854> but I'm not getting any output.
Lösung
You have to use grep -E
or egrep
:
grep -E '<Line: (429|6854)>' filename.text