Javatpoint Logo
Javatpoint Logo

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




Please Share

facebook twitter google plus pinterest tumbler

Latest 4 Tutorials