Handling options with optional arguments with getopts

2021-08-27 Thread nigelberlinguer
‐‐‐ Original Message ‐‐‐ On Friday, August 27, 2021 4:02 PM, Robert Elz wrote: > Date:Fri, 27 Aug 2021 15:05:52 + > From: nigelberlinguer via Bug reports for the GNU Bourne Again > SHell > >

Handling options with optional arguments with getopts

2021-08-27 Thread nigelberlinguer
‐‐‐ Original Message ‐‐‐ On Friday, August 27, 2021 8:52 PM, Robert Elz wrote: > Date:Fri, 27 Aug 2021 17:20:39 + > From: nigelberlinguer > > Message-ID: > > > > | It should be noted though, that the POSIX requirement by "G

Handling options with optional arguments with getopts

2021-08-27 Thread nigelberlinguer
‐‐‐ Original Message ‐‐‐ On Friday, August 27, 2021 8:52 PM, Robert Elz wrote: > Date:Fri, 27 Aug 2021 17:20:39 + > From: nigelberlinguer > > Message-ID: > > > > | It should be noted though, that the POSIX requirement by "G

Handling options with optional arguments with getopts

2021-08-27 Thread nigelberlinguer via Bug reports for the GNU Bourne Again SHell
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