Bash Programming : Multiplication

Here I tried this on ubuntu

To create the file

cat>mul

code type in the terminal:

read a
read b
mul=`expr $a "*" $b`
echo $mul

save the file and close editing mode:

ctrl+d

change the permission of this file:

chmod +x mul

to show the output

sh mul
4
5
20

 

It would be a great help, if you support by sharing :)
Author: zakilive

Leave a Reply

Your email address will not be published. Required fields are marked *