Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
An unix shell script to display total transmitted data through your NowTV and Sky router (in the UK)
# An unix shell script to display total transmitted data through you NowTV router (in the UK),
# should work with Sky router with a little bit of modification
# Refresh every 2 seconds, press Ctrl+C to stop.
# Replace the `admin:nowtv` with the username:password of your NowTV router's admin credential if you've changed it.
while true; \
do \
curl --user admin:nowtv http://192.168.0.1/Now_TV_system.html 2>/dev/null \
| grep -ioE "(\d{4,})<\/td>" \
| grep -o '[0-9]*' \
| sed '/^\s*$/d' \
| awk '{print ($1*10)/1024/1024}' \
| tail -r \
| sed '4q;d' \
| awk '{print "Total transmitted data: "$1" GB"}'; \
sleep 2; \
done
# An unix shell script to display total transmitted data through you Sky router (in the UK),
# Refresh every 2 seconds, press Ctrl+C to stop.
# usage
# $ export SKY_PWD=<your sky password>
# $ curl https://gist.githubusercontent.com/mustakimali/13475ffd3eb02b3c8f48167b73643bda/raw/6e4d498a3dbdaf6bcdc383691bf24052189ba9c3/Sky_Total_Transmission.sh | bash
while true; \
do \
curl --user admin:$SKY_PWD http://192.168.0.1/sky_system.html 2>/dev/null \
| grep '<td>MER' \
| grep -o '[0-9]*' \
| head -1 \
| awk '{print ($1*10)/1024/1024}' \
| awk '{print "Total transmitted data: "$1" GB"}'; \
sleep 2; \
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.