A GNU bash2 oddity -- was: Re: [NTLUG:Discuss] An Oddity (bug) inRedhat 7.1
Kenneth Loafman
ken at lt.com
Mon Oct 29 08:38:16 CST 2001
Thanks for the help on this. Looks like we want to find a new rpm for
bash for 7.1, then everything will work. That's easier than going back
through the full release process for our code. Will put in a bug report
against our stuff to move away from the use of the system() call. [FYI
- system() uses /bin/sh by default, so changing the behavior of system()
may be more problematic].
...Ken
R P Herrold wrote:
>
> 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]#
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
More information about the Discuss
mailing list