Shell Scripting Tutorial – 4


Now, lets perform arithmetic operation using Bash Shell Scripting . I am using `let` which allows us

Now, you can perform operation like

value++ = Increments by 1

value– = Decrements by 1

value = x + y -> Addition

Similarly, all other operations. But in multiplication you need to use \* for escaping 🙂



let “a = 10 + 20”
echo $a

let a–
echo $a

let “a = 5 * 4”
echo $a

let “a = $1 + 30”
echo $a


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s