Quote:
Originally Posted by joeyg
Code:
> echo `echo "<EmailAddress>abc@gmail.com</EmailAddress>" | tr ">" "\n" | tr "<" "\n" | grep "@" | wc -c`
14
Note that I am off by one character as the echo gives a new-line.
Thus...
Code:
> echo `echo "<EmailAddress>abc@gmail.com</EmailAddress>" | tr ">" "\n" | tr "<" "\n" | grep "@" | wc -c` -1 | bc
13
or
Code:
> echo "<EmailAddress>abc@gmail.com</EmailAddress>" | tr ">" "\n" | tr "<" "\n" | grep "@" | tr -d "\n" | wc -c
13
|
thanks for your reply
but if we dont know what is there in between tags then how can we do means if we dont know/we didnt see the email id which is in between tags
for ex: EmailAddress>-------</EmailAddress>" in this ---- is nothing but some email id