Variables Example 1

 Script ======================================================
[prabhucloudxlab@cxl$n4 ~]$ cat>shell-1.sh

#! /bin/bash
#----------- VARIABLES

#-----------system defined variables
echo $PWD # current working directory
echo $BASH # Bash shell name
echo $LOGNAME # Name of the Login User


#-----------User defined variables
name="prabhu"
job="QA-engineer"
echo $name and His job is $job


#Basic arithmetic using expr

echo "a=10, b=3"
echo "c is the value of addition c=a+b"
a=10
b=3
echo "c= `expr $a + $b`"


Output

[prabhucloudxlab@cxl$n4 ~]$ sh shell-1.sh
/home/adimulamvenkat19851609
/usr/bin/sh
adimulamvenkat19851609

prabhu and His job is QA-engineer

a=10, b=3
c is the value of addition c=a+b
c= 13