grep -o -E '\(\".*\"\)' get_list.txt
Should do it if you want to include the ("
and the ")
If you don't want those, then you need the following:
sed 's/^.*(\"\(.*\)\").*$/\1/' get_list.txt
Explanation:
s/ substitute
^.*(\" all characters from the start of the string until a (" (the " is escaped)
\(.*\) keep the next bit in a buffer - this is the match I care about
\") this signals that the bit I'm interested in is over
.*$ then match to the end of the line
/\1/ replace all of that with the bit I was interested in
(Note - I changed the grep
and sed
command in response to valid comments that a pipe wasn't necessary).