Need help sorting out some values with script

Moderator: leecollings

Post Reply
gertlind1
Posts: 29
Joined: Wednesday 25 December 2013 12:17
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Need help sorting out some values with script

Post 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.
---
Gert
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Need help sorting out some values with script

Post by Egregius »

Already tried with php? Shouldn't be that hard to put that string in a array.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest