Advertisement
Guest User

3

a guest
Dec 13th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. if [[ $3 == "add" ]]
  4. then
  5. let "result = $1 + $2"
  6. echo $result
  7.  
  8.  
  9. else
  10. if [[ $3 == "mul" ]]
  11. then
  12. let "result = $1 * $2"
  13. echo $result
  14.  
  15. else
  16. if [[ $3 == "sub" ]]
  17. then
  18. let "result = $1 - $2"
  19. echo $result
  20. fi
  21. fi
  22. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement