fix traffic generator output parsing

refs #2832

Change-Id: If00b8afb8855ec1cf33bcd8100c89c22656e486e
diff --git a/test_localhop/localhop-test.sh b/test_localhop/localhop-test.sh
index 2289722..19aa099 100755
--- a/test_localhop/localhop-test.sh
+++ b/test_localhop/localhop-test.sh
@@ -82,7 +82,7 @@
 # analyze server log
 echo "analyzing server log..."
 output=$(grep "Total Interests Received" $workdir/logs/server.log | head -2 | tail -1 | cut -d= -f2 | cut -d' ' -f2)
-if [ $output != '0' ]
+if [ $output != 0?(.+(0)) ]
 then
     echo "Expected no interests with name ndn:/localhop/test-localhop/A/1 received on host C. Actual: $output"
     echo "For more information, please examine the log at \"$(pwd)/logs\""
diff --git a/test_localhost_scope/in-master.sh b/test_localhost_scope/in-master.sh
index a247492..756ffd7 100755
--- a/test_localhost_scope/in-master.sh
+++ b/test_localhost_scope/in-master.sh
@@ -39,7 +39,7 @@
 
 # analyze server log
 output=$(grep "Total Interests Received" $workdir/logs/server.log | head -1 | cut -d= -f2 | cut -d' ' -f2)
-if [[ $output != '0' ]]
+if [[ $output != 0?(.+(0)) ]]
 then
     echo "Expected no Interests received on host B. Actual: $output"
     echo "For more information, please examine the log at \"$(pwd)/logs\""
diff --git a/test_tcp_udp_tunnel/tcp-udp-tunnel-test.sh b/test_tcp_udp_tunnel/tcp-udp-tunnel-test.sh
index 96bbd76..1e8f9dd 100755
--- a/test_tcp_udp_tunnel/tcp-udp-tunnel-test.sh
+++ b/test_tcp_udp_tunnel/tcp-udp-tunnel-test.sh
@@ -66,7 +66,7 @@
 # examine client log
 echo "analyzing results..."
 output=$(grep "Total Interest Loss" $workdir/logs/client.log | head -1 | cut -d= -f2 | cut -d' ' -f2 | cut -d% -f1)
-if [ $output != '0' ]
+if [[ $output != 0?(.+(0)) ]]
 then
     echo "Expected no Interest Loss. Actual: $output%"
     echo "For more information, please examine the log at \"$(pwd)/logs\""
diff --git a/test_unixface/unix-face-test.sh b/test_unixface/unix-face-test.sh
index 0c25793..839a76b 100755
--- a/test_unixface/unix-face-test.sh
+++ b/test_unixface/unix-face-test.sh
@@ -19,7 +19,7 @@
     echo "ndn-traffic client does not end normally. See logs/client.log"
     exit 1
 fi
-if [[ $output != '0' ]]
+if [[ $output != 0?(.+(0)) ]]
 then
     echo "Expected no interest Loss. Actual: $output%"
     echo "For more information, please examine the log at \"$(pwd)/logs\""