🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Peter Su Wed, 02 Aug 1989 13:21
Bug in bash "[" function
#406
Author: 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
Bug in bash "[" function
#411
Author: Brian Fox
Date: Wed, 02 Aug 1989 21:46
21 lines
979 bytes
   Date: Wed, 2 Aug 89 09:21:13 EDT
   From: hugo@griggs.dartmouth.edu (Peter Su)


   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.

Thanks.  Fixed.

Brian
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads