I have to get the value between the two "key" words using either awk or sed or if it is some other tool also I am fine. I have tried below code, I am not getting the desired output.
echo "<response status = 'success'><result><key>LUFRPhdfhhfufhroghyuefbFJyaEkwamhjMnRxVW9ZWT1854165442156744ZiZlljbjlHSlBjNXgwMzVJcz0=</key></result></response>" | awk -v FS="key" 'NF>1{print $2}'
Output I expect is:
LUFRPhdfhhfufhroghyuefbFJyaEkwamhjMnRxVW9ZWT1854165442156744ZiZlljbjlHSlBjNXgwMzVJcz0=