bug-bash
[Top][All Lists]
Advanced

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

Re: Preventing Bash Variable Confusion


From: Chris F.A. Johnson
Subject: Re: Preventing Bash Variable Confusion
Date: Thu, 30 Jan 2020 21:13:45 -0500 (EST)
User-agent: Alpine 2.21 (DEB 202 2017-01-01)

On Thu, 30 Jan 2020, Roger wrote:

They still allow you to define constants in all-caps.  The impact it
makes is not so different with defining globals as such.  Try Ruby.

The reason I used to prefer using all uppercase/capital letters, the variable
definitations would stand out similar to C style definition macros.  Variables
become extremely identifiable and comprehensible.

A text editor, such as emacs in Bash mode, can highlight variables. No
need to use any sort of naming convention.

--
   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)



reply via email to

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