bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Handling options with optional arguments with getopts


From: nigelberlinguer
Subject: Handling options with optional arguments with getopts
Date: Fri, 27 Aug 2021 15:05:52 +0000

I am trying to use getopts so one of the options can use an optional argument.

Have seen many discussions online about using getopts to handle options with 
optional arguments,
But also a lot of confusing arguments against many workarounds. Could bash 
getopts have a natural
way to introduce an option with a optional argument, and have the procedure 
documented in the bash manual,
with an example, if you please.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]