mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01: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
@ -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..
|
||||
SNR_ARRAY=( 0 $(cat $FILENAME | grep " ch_snr" | awk -F "nowrap>| <script" ' {print $2 }') )
|
||||
PWR_ARRAY=( 0 $(cat $FILENAME | grep " ch_pwr" | awk -F "nowrap> | <script" ' {print $2 }') )
|
||||
UP_PWR_ARRAY=( 0 $(cat $FILENAME | grep " up_pwr" | awk -F "nowrap>| <script" ' {print $2 }') )
|
||||
SNR_ARRAY=( 0 $(awk -F'[<>]' '/ ch_snr/{print $3}' $FILENAME) )
|
||||
PWR_ARRAY=( 0 $(awk -F'[<>]' '/ ch_pwr/{print $3}' $FILENAME) )
|
||||
UP_PWR_ARRAY=( 0 $(awk -F'[<>]' '/ up_pwr/{print $3}' $FILENAME) )
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user