Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- function main
- {
- echo here
- while getopts "Ah" cli_opt; do
- case ${cli_opt} in
- A)
- echo "op A"
- start_all
- return $?
- ;;
- *)
- echo invalid option
- showHep
- exit 1
- ;;
- h)
- showHelp
- exit 0
- ;;
- ?)
- invalid option
- showHelp
- exit 1
- ;;
- :)
- option -$OPTARG requires an argument
- showHelp
- exit 1
- ;;
- esac
- done
- }
- main
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement