linux - example of how to use getopts in bash - Stack Overflow
#!/bin/bash usage() { echo "Usage: $0 [-s ] [-p ]" 1>&2; exit 1; } while getopts ":s:p:" o; do case "${o}" in s) s=${OPTARG} ((s == 45 || s == 90)) || usage ;; p) p=${OPTARG ...
stackoverflow.com |