Created
August 19, 2016 09:41
-
-
Save anonymous/fd37413b135e39f53d313239e5292fac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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