bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

closing parenthesis bug


From: andrew deryabin
Subject: closing parenthesis bug
Date: Wed, 11 Apr 2001 12:52:00 +0400
User-agent: Mutt/1.2.5i

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: freebsdelf4.2
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
-DCONF_OSTYPE='freebsdelf4.2' -DCONF_MACHTYPE='i386-unknown-freebsdelf4.2' 
-DCONF_VENDOR='unknown' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib 
-I/usr/include -g -O2
uname output: FreeBSD djsf 4.2-RELEASE FreeBSD 4.2-RELEASE #1: Sat Mar 17 
00:10:48 MSK 2001     djsf@djsf:/usr/src/sys-4.2/compile/DJSF  i386
Machine Type: i386-unknown-freebsdelf4.2

Bash Version: 2.05
Patch Level: 0
Release Status: release

Description:

foo=$(
    case $1 in
        *bar*)  echo 1;;
        *)      echo 0;;
    esac
)

echo $foo

This script works with FreeBSD sh (and is properly highlighted by VIM :) ),
but fails with bash:

[djsf@djsf:~]$ bash case.sh 
case.sh: line 5: syntax error near unexpected token `;'
case.sh: line 5: `      *bar*)  echo 1;;'


-- 
cu,djsf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]