diff --git a/hdhrstatus0.sh b/hdhrstatus0.sh new file mode 100755 index 0000000..cc1f808 --- /dev/null +++ b/hdhrstatus0.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +HDHRIP='192.168.9.100' +tunerCount="3" # tuner count minus 1 since tuners start at 0 +f=0 + +printdata () { +IFS=$'\n' +echo "Tuner Number, Virtual Channel, Frequency, Program Number, Modulation Lock, Signal Strength, Signal Quality, Symbol Quality, Streaming Rate, Resource Lock," +printf "Tuner $f, "; +for p in $(curl -s "http://${HDHRIP}/tuners.html?page=tuner$f" | egrep "Virtual Channel|Frequency|Program Number|Modulation Lock|Signal Strength|Signal Quality|Symbol Quality|Streaming Rate|Resource Lock" | sed 's///g' | sed 's###g' | sed 's###g' | sed 's/Virtual Channel//g' | sed 's/Frequency//g' | sed 's/ProgramFrequency//g' | sed 's/Program Number//g' | sed 's/Modulation Lock//g' | sed 's/Signal Strength//g' | sed 's/Signal Quality//g' | sed 's/Symbol Quality//g' | sed 's/Streaming Rate//g' | sed 's/Resource Lock//g'); do + printf "%s, " $p; +done +echo "" +} + +printdata | rev | sed 's/,//' | rev diff --git a/hdhrstatus1.sh b/hdhrstatus1.sh new file mode 100755 index 0000000..e6eadec --- /dev/null +++ b/hdhrstatus1.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +HDHRIP='192.168.9.100' +tunerCount="3" # tuner count minus 1 since tuners start at 0 +f=1 + +printdata () { +IFS=$'\n' +echo "Tuner Number, Virtual Channel, Frequency, Program Number, Modulation Lock, Signal Strength, Signal Quality, Symbol Quality, Streaming Rate, Resource Lock," +printf "Tuner $f, "; +for p in $(curl -s "http://${HDHRIP}/tuners.html?page=tuner$f" | egrep "Virtual Channel|Frequency|Program Number|Modulation Lock|Signal Strength|Signal Quality|Symbol Quality|Streaming Rate|Resource Lock" | sed 's///g' | sed 's###g' | sed 's###g' | sed 's/Virtual Channel//g' | sed 's/Frequency//g' | sed 's/ProgramFrequency//g' | sed 's/Program Number//g' | sed 's/Modulation Lock//g' | sed 's/Signal Strength//g' | sed 's/Signal Quality//g' | sed 's/Symbol Quality//g' | sed 's/Streaming Rate//g' | sed 's/Resource Lock//g'); do + printf "%s, " $p; +done +echo "" +} + +printdata | rev | sed 's/,//' | rev diff --git a/hdhrstatus2.sh b/hdhrstatus2.sh new file mode 100755 index 0000000..8e9320a --- /dev/null +++ b/hdhrstatus2.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +HDHRIP='192.168.9.100' +tunerCount="3" # tuner count minus 1 since tuners start at 0 +f=2 + +printdata () { +IFS=$'\n' +echo "Tuner Number, Virtual Channel, Frequency, Program Number, Modulation Lock, Signal Strength, Signal Quality, Symbol Quality, Streaming Rate, Resource Lock," +printf "Tuner $f, "; +for p in $(curl -s "http://${HDHRIP}/tuners.html?page=tuner$f" | egrep "Virtual Channel|Frequency|Program Number|Modulation Lock|Signal Strength|Signal Quality|Symbol Quality|Streaming Rate|Resource Lock" | sed 's///g' | sed 's###g' | sed 's###g' | sed 's/Virtual Channel//g' | sed 's/Frequency//g' | sed 's/ProgramFrequency//g' | sed 's/Program Number//g' | sed 's/Modulation Lock//g' | sed 's/Signal Strength//g' | sed 's/Signal Quality//g' | sed 's/Symbol Quality//g' | sed 's/Streaming Rate//g' | sed 's/Resource Lock//g'); do + printf "%s, " $p; +done +echo "" +} + +printdata | rev | sed 's/,//' | rev diff --git a/hdhrstatus3.sh b/hdhrstatus3.sh new file mode 100755 index 0000000..4c12649 --- /dev/null +++ b/hdhrstatus3.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +HDHRIP='192.168.9.100' +tunerCount="3" # tuner count minus 1 since tuners start at 0 +f=3 + +printdata () { +IFS=$'\n' +echo "Tuner Number, Virtual Channel, Frequency, Program Number, Modulation Lock, Signal Strength, Signal Quality, Symbol Quality, Streaming Rate, Resource Lock," +printf "Tuner $f, "; +for p in $(curl -s "http://${HDHRIP}/tuners.html?page=tuner$f" | egrep "Virtual Channel|Frequency|Program Number|Modulation Lock|Signal Strength|Signal Quality|Symbol Quality|Streaming Rate|Resource Lock" | sed 's///g' | sed 's###g' | sed 's###g' | sed 's/Virtual Channel//g' | sed 's/Frequency//g' | sed 's/ProgramFrequency//g' | sed 's/Program Number//g' | sed 's/Modulation Lock//g' | sed 's/Signal Strength//g' | sed 's/Signal Quality//g' | sed 's/Symbol Quality//g' | sed 's/Streaming Rate//g' | sed 's/Resource Lock//g'); do + printf "%s, " $p; +done +echo "" +} + +printdata | rev | sed 's/,//' | rev