Google News
logo
Unix - Interview Questions
What do you understand by shell variables?
A variable is defined as a character string to which a value is assigned, where values could be the number, text, filename, etc. The shell maintains the set of internal variables as well as enables deletion, assignment, and the creation of variables.

Thus the shell variables are a combination of identifiers and assigned values that exist within the shell. These variables are local to the shell in which they are defined as well as work in a particular way. They may have default values or values that can be assigned manually by using the appropriate assignment command.

* To define a shell variable, the ‘set’ command is used.
* To delete a shell variable, the ‘unset’ command is used.
Advertisement