Quote:
Originally Posted by Christoph Spohr
No surprise, you are using ksh. This solution only works in bash or zsh.
With ksh i can't help you. But this should be easy. Just google for arrays
in ksh. $(...) execute the following command in a subshell. (...) puts
the things inside into an array. Perhaps you can replace (...) by
`...` (backticks). But i don't know.
Probably you will have to adjust the regexp, too. By now it will not
match emails with dots, underscores,dashes etc.
|
I got the answer but works with 1st occurance of the tag only
Code:
awk -F '</?EmailAddress>' '{print $2}' 456.xml
but i need for multiple times .... means email address tag exists for multiple times in the file ...
so need to check whole xml file for email address and get them wherever <EmailAddress></EmailAddress> tag is present.