I want to delete lines from a text file which do not contain parentheses, e.g.:
This is the first line.
This is (123) another line.
Another line.
One more (useless) line.
The result should be:
This is (123) another line.
One more (useless) line.
I found out that
Code:
sed '/(/!d' file > output
should do what I want, but it gives me an empty file.
How can I delete lines NOT containing parentheses?
Thank you for your help!