Home » Shell Scripting Variables

Shell Scripting Variables

by Online Tutorials Library

Shell Scripting Variables

Scripts can contain variables inside the script.

Linux Shell Scripting Variables 1

Look at the above snapshot, two variables are assigned to the script $var1 and $var2.

As scripts run in their own shell, hence variables do not survive the end of the script.

Linux Shell Scripting Variables 2

Look at the above snapshot, var1 and var2 do not run outside the script.

Next TopicSourcing a file

You may also like