You will assign the value of variable var2 to var 1 in this mode; Var1=$var2
A variable is defined by merely assigning a value to a name making use of the = operator. A variable name is a set of alphanumeric character beginning with an alphabet or -. Variables are totally regarded as alphabetical strings, except the context needs them to be regarded as a numeric value. A variable is nothing more than an indicator of the main data.
The shell helps you to build, give, and remove variables. $ character signifies the process ID figure, or PID, of the present shell. You can as well define new variables inside your shell script program.
Variables to the shell are designed to make use of an easy assignment without spaces. However, the shell isn't bothered about the kinds of the variable; they may keep integers, strings, and real numbers.