changeset 159:2ada256e47e1

Cut any spurious whitespace from wc output
author Chris Cannam <cannam@all-day-breakfast.com>
date Fri, 20 Jan 2017 23:39:39 +0000
parents 0876b5e67afe
children 3a318dc7b59e
files vamp-server/test.sh
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/vamp-server/test.sh	Fri Jan 20 22:24:44 2017 +0000
+++ b/vamp-server/test.sh	Fri Jan 20 23:39:39 2017 +0000
@@ -125,15 +125,15 @@
     # probably a bit fragile, let's just count the number of plugins
 
     # First, with no "from" arg to the list call
-    list_no_from=$(head -n +1 "$allrespfile" | fmt -1 | grep '"key"' | wc -l)
+    list_no_from=$(head -n +1 "$allrespfile" | fmt -1 | grep '"key"' | wc -l | sed 's/[^0-9]//g')
 
     # Now with a "from" arg that includes the library that exists
     list_with_good_from=$(tail -n +2 "$allrespfile" | head -n +1 | fmt -1 |
-                              grep '"key"' | wc -l)
+                              grep '"key"' | wc -l | sed 's/[^0-9]//g')
     
     # Now with a "from" arg that doesn't include any real library
     list_with_bad_from=$(tail -n +3 "$allrespfile" | head -n +1 | fmt -1 |
-                             grep '"key"' | wc -l)
+                             grep '"key"' | wc -l | sed 's/[^0-9]//g')
 
     if [ "$list_no_from" != "6" ]; then
         echo "Wrong number of plugins from list response without \"from\" arg"