Variables in Bash

Variables in Bash

 Variables in Bash

The bash variables are the same as in other programming languages. You don’t need to specify the type of variable in bash scripting. Read the below example.


NAME="Test Tutorials"
echo $NAME

launchdate="Feb 08, 2013"
echo $launchdate

Global vs Local Variables

Global variables are accessible anywhere in the script. Where Local variables are accessible in scope only. For example, a variable is used inside a function only.

System Variables


Post a Comment