I have a html file. I want to remove all lines that do not start with <tr>
.
I tried:
cat my_file | sed $'
s/^[^tr].*//
' | sed '/^$/d'
but it deleted all the lines.
sedtext processing
I have a html file. I want to remove all lines that do not start with <tr>
.
I tried:
cat my_file | sed $'
s/^[^tr].*//
' | sed '/^$/d'
but it deleted all the lines.
Best Answer
Try this with GNU sed:
or