Linux Shell Scripting Tutorial (LSST) v1.05r3 | ||
Chapter 2: Getting started with Shell Programming | ||
|
To define UDV use following syntax
Syntax:
variable name=value
'value' is assigned to given 'variable name' and Value must be on right side = sign.
Example:
$ no=10
# this is ok$ 10=no
# Error, NOT Ok, Value must be on right side of = sign.
To define variable called 'vech' having value Bus$ vech=Bus
To define variable called n having value 10 $ n=10
| ||
Variables in shell | Rules for Naming variable name (Both UDV and System Variable) |