Most languages have naming conventions for variables, the most common style I see in shell scripts is MY_VARIABLE=foo
. Is this the convention or is it only for global variables? What about variables local to the script?
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
|||
Variables that are introduced by the operating system or start up scripts etc. are usually all in To prevent your own variables from conflicting with environment variables, it is a good practice to use |
|||||||||||||||
|
PATH
orHOME
or anything else the shell might reserve in the future. – jw013 Jul 11 '12 at 20:53