🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #406

Bug in bash "[" function

#406
From: Peter Su
Date: Wed, 02 Aug 1989 13:21
15 lines
776 bytes
When bash interprets this code:

if [ ! -d $xtop/util -o ! -d $xtop/util/imake.includes ]; then
    echo "$progname"":  no X configuration files under $xtop"
    exit 1
fi

it says "[: too many arguments.", Bourne shell "[" works fine on the
same expression.

I think this is because the precedence of the ! operator is different
in bash than in sh.

Pete
Technical Details
Message-ID: <8908021321.AA27974@griggs.dartmouth.edu>
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!GRIGGS.DARTMOUTH.EDU!hugo

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!GRIGGS.DARTMOUTH.EDU!hugo
From: hugo@GRIGGS.DARTMOUTH.EDU (Peter Su)
Newsgroups: gnu.bash.bug
Subject: Bug in bash "[" function
Message-ID: <8908021321.AA27974@griggs.dartmouth.edu>
Date: 2 Aug 89 13:21:13 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 15