Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- while getopts ":a:" opt; do
- case $opt in
- a)
- echo "-a was triggered, Parameter: $OPTARG" >&2
- ;;
- \?)
- echo "Invalid option: -$OPTARG" >&2
- exit 1
- ;;
- :)
- echo "Option -$OPTARG requires an argument." >&2
- exit 1
- ;;
- esac
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement