Pregunta

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.

¿Fue útil?

Solución

You have to use grep -E or egrep:

grep -E '<Line: (429|6854)>' filename.text
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top