bug-bash
[Top][All Lists]
Advanced

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

Bug: 'case' in command substitution not handled correctly


From: Bernd Eggink
Subject: Bug: 'case' in command substitution not handled correctly
Date: Wed, 15 Apr 2009 23:39:19 +0200
User-agent: Thunderbird 2.0.0.21 (X11/20090302)

GNU bash, Version 4.0.17(1)-release (i686-pc-linux-gnu)

The shell doesn't recognize the closing parenthesis of a command substitution if a 'case' command is included and 'esac' is preceded by newline. Example:

x=$(case $a in
> (1) echo one
> esac
> )
>

You can enter as many ')' as you like, the shell still wants another one. This variant works, however:

x=$(case $a in (1) echo one;esac
)

Regards,
Bernd

--
Bernd Eggink
http://sudrala.de




reply via email to

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