Ravi Sir's Cards › AWS
getopts vs manual parsing?
This interview card answers: getopts vs manual parsing? Getopts — short flags, built in. Manual case loop for long --flags. Shift after getopts.
Read card text
What this card says
What it is
getopts: short flags, built in.
Why it matters
Manual case loop for long --flags.
How / example
Shift after getopts.
shift $((OPTIND-1))