Variables
Linux shell programming is a full-fledged programming language and, as such, supports various types of variables. Variables have three major types: environment, built-in, and user.
Environment variables are part of the system environment, and you do not have to define them. You can use them in your shell program. Some of them, such as PATH, can also be modified within a shell program.
Built-in variables are provided by the system. Unlike environment variables, you cannot modify them.
User variables are defined by you when you write a shell script. You can use and modify them at will within the shell program.
A major difference between shell programming and other programming languages is that in shell programming, variables are not typecast. ...
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