Jason Swett Jason Swett - 1 year ago 96
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 Source

getopts is useful here: getopts

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download