Question - What do you understand by shell variables?
Answer -
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 value or values can be assigned manually by using appropriate assignment command.
- To define a shell variable, the ‘set’ command is used.
- To delete a shell variable, ‘unset’ command is used.