I have the data this
&mac=1E-30-6C-A2-47-5F&ip=172.16.1.127&msk=255.255.255.0&gw=172.16.1.1&pdns=0.0.0.0&sdns=0.0.0.0&Speed=0&PortNo=10001&PerMatFram=0&ComPort=0
I want to extract the data string and store it in a variable using sed commond like
ip=172.16.1.127
mac=xyz
How to use sed with the above string?
I have tried using like this
IP=`echo "$QUERY_STRING" | sed -n '/&ip=/,/&)/g'
but it is not giving any data.