Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Above line to specify which shell to be used to execute the program
- echo "Enter first Number" # echo used to print the message to screen
- read first_number # read and store the input from terminal
- echo "enter second Number"
- read second_number
- sum=`expr $first_number + $second_number` # things insed the backtick ` are evaluate or executed
- echo "$first_number + $second_number = $sum" # $ to specify arguments
- # give execution permission to file before running the program like bellow
- # chmod +x add1.sh
- # run the program by ./add1.sh
Add Comment
Please, Sign In to add comment