Page 1 of 1

Need help sorting out some values with script

Posted: Saturday 19 November 2016 10:56
by gertlind1
Hi

Anyone that can show me how to sort out below values from a text file?
"signalstrength":"30 % (4G)" ,"wanstatus":"CONNECTED"

I want to make a check of my mobile internet connection in our cottage.
I can get a file out from the 3/4G modem using curl, above information is in this file.

I want to place the signalstrenght and the wan status in two different variables.
Tried with awk and some other tools, totally gruel to me.

Re: Need help sorting out some values with script

Posted: Saturday 19 November 2016 11:14
by Egregius
Already tried with php? Shouldn't be that hard to put that string in a array.