Variables
In algebra, you learned that you can use letters to stand for unknown quantities in algebraic equations, and that these letters were called variables. In programming, the concept is pretty much the same, although variables can hold strings (strings of characters) as well as numbers.
There are two types of variables you will deal with in shell programming: shell variables and environment variables. The primary difference is that environment variables will be available to other scripts or programs that you call from inside your shell program and shell variables will be available only to the script itself.
Variables in shell programming are loosely typed; they do not have to be declared or typeset before they can be used. All variables ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access