Re: $(case x in x)...

2006-01-04 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 12/28/2005 12:00 PM: > > My results: bash 3.1, with or without patch 1, still has > the bug. > > $ k=$(case x in x) echo hi; esac) > bash: syntax error near unexpected token `esac' While we are co

Re: $(case x in x)...

2006-01-03 Thread Sven Mascheck
Eric Blake in <[EMAIL PROTECTED]>: > several platforms, including Solaris' /bin/sh, still do not > parse ( in case patterns even today, so it is certainly > not portable if you don't have access to a POSIX shell. Even if they parsed it, it wouldn't be portable, because no traditional Bourne shell

Re: $(case x in x)...

2006-01-02 Thread Eric Blake
> Eric> $ k=$(case x in (x) :; esac) > Huh, they only taught us ) in school. > Is () since Bell Labs days too? POSIX requires shells to support case x in (x), but older bourne shells do not support this newer syntax. That is probably why you were not taught it; if I understand corre

Re: $(case x in x)...

2005-12-28 Thread Eric Blake
> I have confirmed that > it still exists in bash-3.1-beta1, but have not yet tested > if bash 3.1 final patchlevel 1 has fixed the bug. My results: bash 3.1, with or without patch 1, still has the bug. $ k=$(case x in x) echo hi; esac) bash: syntax error near unexpected token `esa

Re: $(case x in x)...

2005-12-28 Thread Eric Blake
> However, who is it that is too hungry for the next ")"?: > $ k=$(case x in x) :;; esac) > bash: syntax error near unexpected token `;;' > $ k=$(case x in x) :; esac) > bash: syntax error near unexpected token `esac' > $ k=`case x in x) :; esac` I beli

$(case x in x)...

2005-12-28 Thread Dan Jacobson
The man page berates old-timers: When the old-style backquote form of substitution is used... However, who is it that is too hungry for the next ")"?: $ k=$(case x in x) :;; esac) bash: syntax error near unexpected token `;;' $ k=$(case x in x) :; esac) bash: syntax error