Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15856 > unrolled thread

Re: Preventing Bash Variable Confusion

Started by"Chris F.A. Johnson" <chris@cfajohnson.com>
First post2020-01-30 12:02 -0500
Last post2020-01-30 12:02 -0500
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Preventing Bash Variable Confusion "Chris F.A. Johnson" <chris@cfajohnson.com> - 2020-01-30 12:02 -0500

#15856 — Re: Preventing Bash Variable Confusion

From"Chris F.A. Johnson" <chris@cfajohnson.com>
Date2020-01-30 12:02 -0500
SubjectRe: Preventing Bash Variable Confusion
Message-ID<mailman.115.1580403769.2384.bug-bash@gnu.org>
On Wed, 29 Jan 2020, Chet Ramey wrote:

> On 1/29/20 2:05 PM, Roger wrote:
>
>> "Linux Shell Scripting with Bash." (Burtch) suggested using declare instead of
>> local, due to local lacking the other switches declare provides. p262 (eg.
>> declare can specify type of variable, such as integar only.)
>
> This is just wrong. `local' accepts the same option set as `declare'.

There are other things wrong in that book as well; the description of
printf, for example.

Don't use it as an authority on bash.

-- 
    Chris F.A. Johnson                         <http://cfajohnson.com/>
    =========================== Author: ===============================
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
    Pro Bash Programming: Scripting the GNU/Linux shell (2009, Apress)

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web