Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- : ${1:?first argument is required}
- : ${2:?second argument is required}
- #!/bin/sh
- die() { echo "$@" >&2; exit 1; }
- case ${1?} in
- foo) test $# = 4 || die When first argument is foo, you must give 4 args;;
- bar) test $# = 2 || die When first argument is bar, only give 2 args;;
- *) ;;
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement