Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15856
| From | "Chris F.A. Johnson" <chris@cfajohnson.com> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: Preventing Bash Variable Confusion |
| Date | 2020-01-30 12:02 -0500 |
| Message-ID | <mailman.115.1580403769.2384.bug-bash@gnu.org> (permalink) |
| References | (2 earlier) <20806.1580277461@jinx.noi.kre.to> <19032.1580321011@jinx.noi.kre.to> <20200129190553.GC5533@localhost4.local> <b9e672cf-9d32-b066-409d-882032cd79ae@case.edu> <alpine.DEB.2.21.2001301157560.27533@chris> |
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)
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: Preventing Bash Variable Confusion "Chris F.A. Johnson" <chris@cfajohnson.com> - 2020-01-30 12:02 -0500
csiph-web