Parse script options
low risk
Parses short options in shell scripts. See the flags and examples below, and run `man getopts` for the full reference.
while getopts "f:v" opt; do :; doneParse -f value and -v · explain & risk-check →Reference text is hand-written and may be incomplete — check man getopts for your version. Test destructive commands on a non-production system first.