[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

parse-duration.sh: read -u3 non-portable

From: Simon Josefsson
Subject: parse-duration.sh: read -u3 non-portable
Date: Mon, 01 Jun 2009 14:23:12 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.94 (gnu/linux)

test-parse-duration fails on Solaris [1]:

./test-parse-duration.sh: -u3: is not an identifier
FAIL: test-parse-duration.sh

How about the patch below?  Seems to work here.


[1] http://autobuild.josefsson.org/gnulib/log-200905311157044761000.txt

diff --git a/tests/test-parse-duration.sh b/tests/test-parse-duration.sh
index 1200561..6aeb225 100755
--- a/tests/test-parse-duration.sh
+++ b/tests/test-parse-duration.sh
@@ -60,7 +60,7 @@ cat > "${tmpf}" <<- _EOF_
 exec 3< "${tmpf}"
-while read -u3 line
+while read line <&3
     v=`${exe} "${line}"` || { ls -l "${tmpf}"; die "Failed: ${exe} '${line}'"; 
     test $v -eq 38898367 || die $v is not 38898367

reply via email to

[Prev in Thread] Current Thread [Next in Thread]