SED
https://www.regextester.com/1946
Print the string between two parentheses
G8 = P(G1,G3) G9 = P(G3,G4)
- sed 's/.*(\(.*\))/\1/' file
while IFS="()" read a b; do echo "$b"; done < file
https://www.regextester.com/1946
G8 = P(G1,G3) G9 = P(G3,G4)
while IFS="()" read a b; do echo "$b"; done < file