Advertisement
v1ral_ITS

EXAMPLE: Easy Shell Script Multiple Choice

Apr 18th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.27 KB | None | 0 0
  1. #!/bin/bash
  2. echo "select the operation ************  1)operation 1 2)operation 2 3)operation 3 4)operation 4 "
  3.  
  4. read n
  5. case $n in
  6.     1) commands for opn 1;;
  7.     2) commands for opn 2;;
  8.     3) commands for opn 3;;
  9.     4) commands for  opn 4;;
  10.     *) invalid option;;
  11. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement