From: Lyndon Nerenberg Date: Fri, 6 Dec 2013 22:52:03 +0000 (-0800) Subject: test/common.sh.in: use awk to pick off first output field. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/64fd71ad6a0c0cfb19fb5e49f293b1ab42923f7b?ds=inline test/common.sh.in: use awk to pick off first output field. md5 and md5sum are inconsistent in their use of SP vs HT as a field separator. cut(1) can only handle a single field delimiter character; awk is more forgiving. --- diff --git a/test/common.sh.in b/test/common.sh.in index 1d55dff5..70214127 100644 --- a/test/common.sh.in +++ b/test/common.sh.in @@ -35,7 +35,7 @@ output_md5() #### the same line, the caller needs to add it. This avoids #### differences due to a leading '*' binary file indicator, for #### text files, on some platforms (Cygwin). - @MD5SUM@ $* | @MD5FMT@ | cut -d ' ' -f 1 + @MD5SUM@ $* | @MD5FMT@ | awk '{print $1}' } #### Use built-in $((...)) in test suite if shell supports it.