Shell Variables
Programming languages allow the creation of variables as a mechanism to store data for later manipulation, and UNIX shells are no different. The way shell variables are assigned is different depending on the shell being used. Bourne Shell variables are assigned by simply entering the name of the variable followed by an equal sign and the value you wish to assign to it. They do not need to be defined first and therefore there is no need to say what type of data the variable will hold before it is assigned a value. If a variable holds a string of characters, you may manipulate it as you would the string of characters that was assigned to it, but you may not perform arithmetical operations on it. If the same variable were then to ...
Get Solaris™ Operating Environment Boot Camp now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.