Thread View: gnu.bash.bug
1 messages
1 total messages
Started by Brian Fox
Fri, 04 Aug 1989 15:01
Bug in bash-1.02
Author: 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
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