Changeset 13924 in hybrid


Ignore:
Timestamp:
Jun 15, 2017, 2:34:49 PM (8 years ago)
Author:
rick
Message:

Incomplete matching was causing grep to return multiple lines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/releng-11/nanobsd/files/tools/nameserver-shuffle

    r13915 r13924  
    5050  NAMESERVERS=`sort -n $RESULTLIST | awk '{print $2}'`
    5151  for NAMESERVER in $NAMESERVERS; do
    52     QUERY_TIME=`grep $NAMESERVER $RESULTLIST | cut -d' ' -f1`
     52    QUERY_TIME=`grep "${NAMESERVER}$" $RESULTLIST | cut -d' ' -f1`
    5353    [ $QUERY_TIME = "9999" ] && STATUS="Query time: down" || STATUS="Query time: $QUERY_TIME"
    5454    # awk magic to get maximum length of comment field (for display purposes).
Note: See TracChangeset for help on using the changeset viewer.