Variables

Variables

Use the command declare to create a variable named tmp:

$ declare tmp

In fact, you don’t need to declare a variable at first, you can create it when you want to use it.

Use = to assign the variable tmp to labex

$ tmp=labex

Use echo and $ to read the value of a variable($ is used to refer to the value of a variable, don’t forget to enter it.):

$ echo $tmp
image desc