A
A
Alexander2014-11-20 19:19:09
bash
Alexander, 2014-11-20 19:19:09

Why are shell script variables named in capital letters?

What is the reason for this phenomenon, and what are the advantages of this approach? except for the unity of variable naming in the system. All commands are written in lowercase

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Evseev, 2014-11-20
@vopper

Upper case for global variables (a) makes them easier to keep track of and (b) reduces the chance of conflicts with local variables.
Search Google for something like "shell variable naming convention" for details.
Here you will also find:
- stackoverflow.com/a/673940/2743554
- unix.stackexchange.com/a/42849
- https://google-styleguide.googlecode.com/svn/trunk...
etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question