help-bash
[Top][All Lists]
Advanced

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

Re: getopts silent error reporting


From: Greg Wooledge
Subject: Re: getopts silent error reporting
Date: Sat, 6 May 2023 09:07:18 -0400

On Sat, May 06, 2023 at 09:25:18AM +0000, uzibalqa wrote:
> Is it possible to have a function option that selects whether to use silent 
> error reporting
> for getopts or not?

"help getopts" contains this paragraph:

    If the shell variable OPTERR has the value 0, getopts disables the
    printing of error messages, even if the first character of
    OPTSTRING is not a colon.  OPTERR has the value 1 by default.

Maybe that's what you're looking for?



reply via email to

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