Re: Handling options with optional arguments with getopts

2021-08-28 Thread Robert Elz
Date:Sat, 28 Aug 2021 15:26:28 + From:hancooper Message-ID: | Would the code break if I use shortopts="Vuhv:s" (allows getopts | to issue errors, not in silent mode) but also have the (":") and | ("?") checks inside the case statement? Not break, but the

Re: Handling options with optional arguments with getopts

2021-08-27 Thread Kenneth Irving
On Fri, Aug 27, 2021 at 11:33 AM Lawrence Velázquez wrote: > > On Fri, Aug 27, 2021, at 1:20 PM, nigelberlinguer wrote: > > ‐‐‐ Original Message ‐‐‐ > > On Friday, August 27, 2021 4:02 PM, Robert Elz wrote: > > > XBD 12.2 guideline 7 is: > > > > > > Guideline 7: Option-arguments should no

Re: Handling options with optional arguments with getopts

2021-08-27 Thread Robert Elz
Date:Fri, 27 Aug 2021 17:20:39 + From:nigelberlinguer Message-ID: | It should be noted though, that the POSIX requirement by "Guideline 7" | is not guided by actual portability in the technical sense but by a | rule written in the POSIX standard. Those gu

Re: Handling options with optional arguments with getopts

2021-08-27 Thread Lawrence Velázquez
On Fri, Aug 27, 2021, at 1:20 PM, nigelberlinguer wrote: > ‐‐‐ Original Message ‐‐‐ > On Friday, August 27, 2021 4:02 PM, Robert Elz wrote: > > XBD 12.2 guideline 7 is: > > > > Guideline 7: Option-arguments should not be optional. > > > > That is, if you want to be able to give an option a

Re: Handling options with optional arguments with getopts

2021-08-27 Thread Robert Elz
Date:Fri, 27 Aug 2021 15:05:52 + From:nigelberlinguer via Bug reports for the GNU Bourne Again SHell Message-ID: <0IgsinjPxg5VSubCxyc64u9axdDTEubUNcQFmIaPyduotl2CyQ9g71uoLtpmXL2hUph1_eHzVRnEZ7vyyHFKqqy3OlPydQXccd2CkHyzpjA=@protonmail.com> | I am trying to use