mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Simplified parsing of the html table. Everything is done with awk. Got rid of cat and grep
This commit is contained in:
parent
771fb2dd72
commit
b25acb9a2d
1 changed files with 3 additions and 3 deletions
|
@ -124,9 +124,9 @@ curl -s -o $FILENAME http://192.168.100.1/Docsis_system.asp
|
||||||
|
|
||||||
|
|
||||||
# Bash arrays starts on index 0, we 0-pad the first index. It makes it easier later on..
|
# Bash arrays starts on index 0, we 0-pad the first index. It makes it easier later on..
|
||||||
SNR_ARRAY=( 0 $(cat $FILENAME | grep " ch_snr" | awk -F "nowrap>| <script" ' {print $2 }') )
|
SNR_ARRAY=( 0 $(awk -F'[<>]' '/ ch_snr/{print $3}' $FILENAME) )
|
||||||
PWR_ARRAY=( 0 $(cat $FILENAME | grep " ch_pwr" | awk -F "nowrap> | <script" ' {print $2 }') )
|
PWR_ARRAY=( 0 $(awk -F'[<>]' '/ ch_pwr/{print $3}' $FILENAME) )
|
||||||
UP_PWR_ARRAY=( 0 $(cat $FILENAME | grep " up_pwr" | awk -F "nowrap>| <script" ' {print $2 }') )
|
UP_PWR_ARRAY=( 0 $(awk -F'[<>]' '/ up_pwr/{print $3}' $FILENAME) )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue