extract word from bracket - shell

Related to :
thread : 34769-removing-duplicate-lines-file.html

i want to extract the words in ()

eg: string1="bla bla (aaa) aha hai (aa)"

after processing output i need is : aaa aa

echo "$string1"| awk -F"[()]" '{print $2, $4}'
1 Like

Thanks Franklin..

i got one more..

echo "asdfsdf asdf dsads.(aaa)" |sed 's/"//g' | sed 's/)//g' | awk -F"(" '{print $2}'