A GNU bash2 oddity -- was: Re: [NTLUG:Discuss] An Oddity (bug) in Redhat 7.1
R P Herrold
herrold at owlriver.com
Sun Oct 28 17:59:54 CST 2001
Note the subject line change:
On Sun, 28 Oct 2001, Kenneth Loafman wrote:
> like the ones I supplied, or with system() calls in Python, etc. sh is
> symlinked to bash, so the name difference may be the problem. Still
> chasing. If you've got access to 7.1 and 7.2 I'd appreciate a run of
> the tests from the first message in this thread.
"Use the source, Luke" <grin>
from the changelog for bash2.05
-------------------------- quote ----------------------------
This document details the changes between this version,
bash-2.05-release, and the previous version, bash-2.05-beta2.
3. New Features in Bash
a. The `>&word' redirection now works in POSIX mode as it does by default,
since POSIX.2 leaves it unspecified.
-------------------------- end quote ------------------------
---------------------------------
RH 7.2 host (bash2-05):
bash-2.05$ ./testredir
Test with \&\>
Test with \>\&
==========================
testredir1 started
==========================
testredir1 started
bash-2.05$ cat testredir testredir1
#! /bin/sh
bash-2.05$ ./testredir ; cat testredir testredir1
Test with \&\>
Test with \>\&
==========================
testredir1 started
==========================
testredir1 started
#!/bin/sh
echo "Test with \&\>"
./testredir1 &> testredir1a.log
echo "Test with \>\&"
./testredir1 >& testredir1b.log
echo "=========================="
cat testredir1b.log
echo "=========================="
cat testredir1b.log
#!/bin/sh
echo "testredir1 started"
bash-2.05$
(that is, expected results -- I have made quoting changes on
the echo, and the she-bang to conform to my coding style)
--------------------------------------------
RH 7.1 (bash2.04) -- Expectedly, I do not get the second file
either:
[root at serverc /root]# ./testredir ; cat testredir testredir1
Test with \&\>
Test with \>\&
testredir1 started
==========================
testredir1 started
==========================
cat: testredir1b.log: No such file or directory
#!/bin/sh
echo "Test with \&\>"
./testredir1 &> testredir1a.log
echo "Test with \>\&"
./testredir1 >& testredir1b.log
echo "=========================="
cat testredir1a.log
echo "=========================="
cat testredir1b.log
#!/bin/sh
echo "testredir1 started"
[root at serverc /root]#
More information about the Discuss
mailing list