Nodewatcher was confused if link_quality was below 100

When the link_quality is below below 100 there is a little whitespace
between the value an the bracket like ( 99). This confused the awk
skript and is fixed by filtering all brackets.

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
This commit is contained in:
Tim Niemeyer 2012-10-24 20:44:00 +02:00
parent 16f1b7c8d4
commit ce90577b5d
1 changed files with 1 additions and 2 deletions

View File

@ -181,12 +181,11 @@ crawl() {
BAT_ADV_ORIGINATORS=`batctl o -n | awk '/O/ {next} /B/ {next} {print}'`
count=0;
for row in $BAT_ADV_ORIGINATORS; do
row="${row//[\(\)]/}"
originator=`echo $row | awk '{print $1}'`
last_seen=`echo $row | awk '{print $2}'`
last_seen="${last_seen//s/}"
link_quality=`echo $row | awk '{print $3}'`
link_quality="${link_quality//(/}"
link_quality="${link_quality//)/}"
outgoing_interface=`echo $row | awk '{print $6}'`
outgoing_interface="${outgoing_interface//]:/}"
nexthop=`echo $row | awk '{print $4}'`