Hi
I have requirement to search string starting with specific characters and print whole matching word in that string.
example
mystr="ATTRIBUTE NAME="Event Name" VALUE="Execute""
I want to search by passing "NAME=" and result should be NAME="Event Name".
i am using below command but that is printing whole line.
grep "NAME=" $mystr
Please help how to achieve above requirement.
Thanks for all your help.
Mallik.