[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Declared Var Dynamic Initialization = No Return Code Back?
From: |
Greg Wooledge |
Subject: |
Re: Declared Var Dynamic Initialization = No Return Code Back? |
Date: |
Wed, 13 Sep 2017 08:43:06 -0400 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Tue, Sep 12, 2017 at 06:20:35PM -0700, Eduardo Bustamante wrote:
> On Tue, Sep 12, 2017 at 5:04 PM, Adam Danischewski
> <adam.danischewski@gmail.com> wrote:
> [...]
> > Declaring a variable doesn't seem risky enough to eat up the return code.
> > Is there a reason for this? I doubt that it would break anything to change.
> > It's a lot more intuitive and syntactically streamlined to check for
> > missing packages/software at the initial declaration as a sanity check.
>
> This topic has been discussed several times in the past. Please
> review: https://lists.gnu.org/archive/html/bug-bash/2010-03/msg00010.html
> and https://lists.gnu.org/archive/html/bug-bash/2010-03/msg00036.html
> for an explanation.
Also http://mywiki.wooledge.org/BashPitfalls#pf27