This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
bash-ism in #!/bin/sh script stdio-common/tst-printf.sh
- To: libc-alpha at sourceware dot cygnus dot com
- Subject: bash-ism in #!/bin/sh script stdio-common/tst-printf.sh
- From: Matthew Clarke <Matthew_Clarke at mindlink dot bc dot ca>
- Date: Mon, 26 Feb 2001 18:46:29 -0800
- Organization: Just Me
Hi.
Current CVS head. Make check fails when /bin/sh is PD KSH, because the
script stdio-common/tst-printf.sh says "#! /bin/sh" at the top, but uses
the bash-ism "... >& /dev/null" to redirect both stdout and stderr to
/dev/null.
Patch:
------------------------------------------------------------------------------
Index: stdio-common/tst-printf.sh
===================================================================
RCS file: /cvs/glibc/libc/stdio-common/tst-printf.sh,v
retrieving revision 1.4
diff -u -r1.4 tst-printf.sh
--- tst-printf.sh 2000/09/25 05:09:39 1.4
+++ tst-printf.sh 2001/02/27 02:46:30
@@ -138,7 +138,7 @@
printf ("%hu", 65537) = 1
--- Should be no further output. ---
EOF
-cmp - ${common_objpfx}stdio-common/tst-printf.out >& /dev/null ||
+cmp - ${common_objpfx}stdio-common/tst-printf.out > /dev/null 2>&1 ||
cat <<'EOF' |
%.4x: `0012'
%04x: `0012'
@@ -249,7 +249,7 @@
printf ("%hu", 65537) = 1
--- Should be no further output. ---
EOF
-cmp - ${common_objpfx}stdio-common/tst-printf.out >& /dev/null ||
+cmp - ${common_objpfx}stdio-common/tst-printf.out > /dev/null 2>&1 ||
{
status=1
echo "*** output comparison failed"
------------------------------------------------------------------------------
Matt.
--
"Oh bother," said the Borg, "We have assimilated Pooh".
-- MHR on afp
-- According to a .sig by Chris Suslowicz