Jason Swett Jason Swett - 1 month ago 8
Bash Question

How to handle missing args in shell script

What's the "right" way to handle missing arguments in a shell script? Is there a pre-canned way to check for this and then throw an exception? I'm an absolute beginner.

Answer

getopts is useful here: getopts

Comments