bug-gnulib
[Top][All Lists]
Advanced

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

Fix output redirection buglet in init.sh.


From: Ralf Wildenhues
Subject: Fix output redirection buglet in init.sh.
Date: Sun, 23 May 2010 09:52:30 +0200
User-agent: Mutt/1.5.20 (2009-10-28)

This one is *really* harmless (it'd require 'grep GNU' to cause an
error), but the order of redirection does not do what was meant, so
it should be flipped, or the 2>&1 omitted.  OK to apply?

Thanks,
Ralf

    Fix output redirection buglet in init.sh.
    
    * tests/init.sh: Fix redirection of stderr.

diff --git a/tests/init.sh b/tests/init.sh
index e23aa54..ef0957c 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -143,9 +143,9 @@ framework_failure_() { warn_ "$ME_: set-up failure: $@"; 
Exit 1; }
 # a partition, or to undo any other global state changes.
 cleanup_() { :; }
 
-if ( diff --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then
+if ( diff --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
   compare() { diff -u "$@"; }
-elif ( cmp --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then
+elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
   compare() { cmp -s "$@"; }
 else
   compare() { cmp "$@"; }



reply via email to

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