I have one xml file as below, I need "en" using some unix command.
<void method="put">
<string>LANGUAGE</string>
<string>en</string>
</void>
using below command (got from some link in google),
sed -n '/string/{s/.*<string>//;s/<\/string.*//;p;}' Locale.xml
I am getting output as
LANGUAGE
en
so I used
sed -n '/string/{s/.*<string>//;s/<\/string.*//;p;}' Locale.xml | tail -1
But is there any option in sed by which I can get second value only?