I have line:
<doc lang="en" func="auth" binary="/dnsmgr" host="https://dns.test.com" theme="orion" stylesheet="login" features="b993e382360bcbb508601df300594747" notify=""><auth id="4b0b5cb2210b" level="16">4b0b5cb2210b</auth><tparams><out>xml</out><username>user191642</username><func>auth</func></tparams></doc>
I need to extract id from <auth id="4b0b5cb2210b"
So my result must be: 4b0b5cb2210b
This is a result of the curl requests, so ID will be different next time. Please help me get only the id.
I have tried this to cut the line:
awk -F'level' '{print $1}' | sed 's/^\s*auth id=//' | grep 'auth id=' | sed 's/^.*: //'
and got:
<doc lang=en func=auth binary=/dnsmgr host=https://dns.test.com theme=orion stylesheet=login features=b993e382360bcbb508601df300594747 notify=><auth id=4b0b5cb2210b
I'm close enough to the result. Please help me cut the text before the exact id.