tests: sparse-fiemap: adjust syntax to accommodate older awk
authorAlan Curry <pacman-cu@kosh.dhis.org>
Fri, 22 Apr 2011 09:08:50 +0000 (11:08 +0200)
committerJim Meyering <meyering@redhat.com>
Fri, 22 Apr 2011 09:10:32 +0000 (11:10 +0200)
* tests/cp/sparse-fiemap: Parenthesize ternary expression used
as an argument to awk's printf.  Otherwise, gawk 3.0.1 and the
one from debian stable's original-awk would get a syntax error.
Reported by Dennis Clarke.

Copyright note: tiny change

THANKS.in
tests/cp/sparse-fiemap

index bd8645f..342a52c 100644 (file)
--- a/THANKS.in
+++ b/THANKS.in
@@ -151,6 +151,7 @@ Deepak Goel                         deego@gnufans.org
 Denis Excoffier                     denis.excoffier@airbus.com
 Denis McKeon                        dmckeon@swcp.com
 Dennis Henriksen                    opus@flamingo.osrl.dk
+Dennis Clarke                       dclarke@blastwave.org
 Dennis Smit                         ds@nerds-incorporated.org
 Derek Clegg                         dclegg@next.com
 Dick Streefland                     dick_streefland@tasking.com
index 1394060..64668ed 100755 (executable)
@@ -64,7 +64,7 @@ fi
 f()
 {
   sed 's/ [a-z,][a-z,]*$//' $@ \
-    | awk '/^ *[0-9]/ {printf "%d %d ", $2 ,NF < 5 ? $NF : $5 } END {print ""}'
+    | awk '/^ *[0-9]/ {printf "%d %d ", $2, (NF<5 ? $NF : $5) } END {print ""}'
 }
 
 for i in $(seq 1 2 21); do