bug-bash
[Top][All Lists]
Advanced

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

Re: Problem with if [ -d in bash 4.3.30


From: Stephane Chazelas
Subject: Re: Problem with if [ -d in bash 4.3.30
Date: Tue, 9 Dec 2014 14:47:15 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

2014-12-09 07:14:16 -0700, Eric Blake:
[...]
> No, you get the correct behavior.  Newer bash fixed the parser bug to
> comply with POSIX.
> 
> For comparison, try:
> 
> $ echo . ${VAR:=""} .
> . .
> $ echo . "${VAR:=""}" .
> .  .
[...]

It's a bit confusing that ${VAR:-""} should be treated
differently from ${VAR:=""}. Was there a rationale for changing
the behaviour other than strict POSIX conformance? AFAICT, ksh
and mksh behave differently (from bash and from each other), so
I can't say the change helps much with portability here.

-- 
Stephane



reply via email to

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