[NTLUG:Discuss] An Oddity (bug) in Redhat 7.1
R P Herrold
herrold at owlriver.com
Sun Oct 28 15:17:59 CST 2001
On Sun, 28 Oct 2001, Steve Baker wrote:
> Kenneth Loafman wrote:
> >
> > An interesting bug was found in RH 7.1 shell. Redirection of both
> > stdout and stderr can be done with either >& or &>, with the first form
> > being predominate in use. Both are semantically equivalent according to
> > the bash manual. I've been using >& for years and its embedded in a lot
> > scripts since it works on every other distro. Not so for Redhat 7.1.
Not so with RH 7.2
bash-2.05$ date ; date &> temp ; cat temp
Sun Oct 28 17:09:55 EST 2001
Sun Oct 28 17:09:55 EST 2001
bash-2.05$ date ; date >& temp ; cat temp
Sun Oct 28 17:10:03 EST 2001
Sun Oct 28 17:10:03 EST 2001
bash-2.05$ rpm -q bash
bash-2.05-8
bash-2.05$
[clock not reset yet ...]
Crusing the RH Bugzilla, there were the usual problems in bash
2.04, but I do not see the conduct complained on an RH 7.1
host, either:
[root at ServerB /root]# date ; date &> temp ; cat temp
Sun Oct 28 16:14:24 EST 2001
Sun Oct 28 16:14:24 EST 2001
[root at ServerB /root]# date ; date >& temp ; cat temp
Sun Oct 28 16:14:30 EST 2001
Sun Oct 28 16:14:30 EST 2001
[root at ServerB /root]# rpm -q bash
bash-2.04-21
[root at ServerB /root]#
> > *** &> will redirect both while >& redirects nothing ***
perhaps there is some issue with your profile?
-- Russ
More information about the Discuss
mailing list