On Tue, Sep 22, 2015 at 10:19:56AM -0400, idal...@home.idallen.ca wrote:
> Description:
> Adding a "local" keyword to a variable assignment hides the
> return code of a command substitution. Same problem in both
> bash and dash shells.
Yes, this is how it works. If you care abo
2015-09-22 11:45:20 -0400, Greg Wooledge:
> On Tue, Sep 22, 2015 at 10:19:56AM -0400, idal...@home.idallen.ca wrote:
> > Description:
> > Adding a "local" keyword to a variable assignment hides the
> > return code of a command substitution. Same problem in both
> > bash and dash shells
On 09/22/2015 08:19 AM, idal...@idallen-fibe.dyndns.org wrote:
> Description:
> Adding a "local" keyword to a variable assignment hides the
> return code of a command substitution. Same problem in both
> bash and dash shells.
>
Not a bug.
$() substition can only affect $? if i
bstitution assignment on another line and
check the return code there.
If the behaviour of "local" can't be changed, perhaps the man
page could warn about this?
Repeat-By:
Run this:
#!/bin/bash -u
# Using "local" keyword hides retu