Skip to content

Instantly share code, notes, and snippets.

Created August 19, 2016 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/fd37413b135e39f53d313239e5292fac to your computer and use it in GitHub Desktop.
Save anonymous/fd37413b135e39f53d313239e5292fac to your computer and use it in GitHub Desktop.
#!/bin/bash
#PARAMETERS="Leitungs Signal- Ausgabeleistung Bandbreite"
PARAMETERS="Attenuation Margin Power Bandwidth"
HTML_FILE="modem_data.html"
curl -sS "http://10.0.0.138/cgi/b/dsl/dt/?be=0&l0=2&l1=0" > $HTML_FILE
for param in $PARAMETERS; do
TMP=`cat $HTML_FILE | grep "$param" | sed -e "s/.*colspan='3'>//" | sed -e "s/<.*//" | sed -e "s/,/./g"`
echo $TMP | awk -F/ '{ printf("%f;", $1);}'
echo $TMP | awk -F/ '{ printf("%f;", $2);}'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment