Guest User

Untitled

a guest
May 26th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #!/bin/bash
  2. # Above line to specify which shell to be used to execute the program
  3.  
  4. echo "Enter first Number" # echo used to print the message to screen
  5. read first_number # read and store the input from terminal
  6. echo "enter second Number"
  7. read second_number
  8.  
  9. sum=`expr $first_number + $second_number` # things insed the backtick ` are evaluate or executed
  10. echo "$first_number + $second_number = $sum" # $ to specify arguments
  11.  
  12. # give execution permission to file before running the program like bellow
  13. # chmod +x add1.sh
  14. # run the program by ./add1.sh
Add Comment
Please, Sign In to add comment