Article View: gnu.bash.bug
Article #425Bug in bash-1.02
From: Brian Fox
Date: Fri, 04 Aug 1989 15:01
Date: Fri, 04 Aug 1989 15:01
32 lines
1265 bytes
1265 bytes
Date: Thu, 3 Aug 89 17:13:08 PDT
From: Kayvan Sylvan <kayvan@mrspoc.transact.com>
Sender: kayvan@mrspoc.transact.com
Problem is succinctly stated:
In bourne shell. I'm in a directory containing a file called 'ho'.
$ if [ ! -f ho -a ! -f ho ] ; then echo ho ; else echo YUP ; fi
YUP
$
In bash:
bash$ if [ ! -f ho -a ! -f ho ] ; then echo ho ; else echo YUP ; fi
[: too many arguments
YUP
bash$
This causes numerous shell scripts to fail.
---Kayvan
---
Kayvan Sylvan @ Transact Software, Inc. -*- Mountain View, CA (415) 961-6112
Internet: kayvan@Transact.COM -*- UUCP: ...!{apple,pyramid,mips}!mrspoc!kayvan
Thanks. This problem pointed out to me before, (and a fix given) by
Chet Ramey (chet@pirate.cwru.edu). The problem is the precedence of
`!'.
brian
Technical Details
Message-ID:
<8908041501.AA24236@aurel.caltech.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!AUREL.CALTECH.EDU!bfoxShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!AUREL.CALTECH.EDU!bfox From: bfox@AUREL.CALTECH.EDU (Brian Fox) Newsgroups: gnu.bash.bug Subject: Bug in bash-1.02 Message-ID: <8908041501.AA24236@aurel.caltech.edu> Date: 4 Aug 89 15:01:44 GMT Sender: daemon@tut.cis.ohio-state.edu Reply-To: bfox@aurel.caltech.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 32