I have a requirement like i have to remove the strings or numbers between two Parenthesis in a file. I used sed command but it is working on a single line. My opening Parenthesis is in one line and the closing parenthesis is in other line. How can i do it?
I tried this command using sed:
sed -e 's/([^()]*)//g'
but this works only when My opening and closing parenthesis are on the same line.
For Example:-
Input file:
select a
,b
,c
FROM ABCD
(select e
,f
,g
,h FROM XYZ)
Output should be:
select a
,b
,c
FROM ABCD
-zoption