On Fri, Jan 22, 2021 at 12:12:58AM +0100, Alejandro Colomar wrote:
> This is useful for using tee to just write to a file,
> at the end of a pipeline,
> without having to redirect to /dev/null.
<snip>
> @@ -93,6 +98,7 @@ Copy standard input to each FILE, and also to standard 
> output.\n\
>  "), stdout);
>        fputs (_("\
>    -p                        diagnose errors writing to non pipes\n\
> +  -q, --quiet, --silent     don't write to standard output\n\
>        --output-error[=MODE]   set behavior on write error.  See MODE below\n\
>  "), stdout);
>        fputs (HELP_OPTION_DESCRIPTION, stdout);
> @@ -130,6 +136,7 @@ main (int argc, char **argv)
>  
>    append = false;
>    ignore_interrupts = false;
> +  quiet = false;
>  
>    while ((optc = getopt_long (argc, argv, "aip", long_options, NULL)) != -1)

'q' missing from optstring

>      {
> @@ -151,6 +158,10 @@ main (int argc, char **argv)
>              output_error = output_error_warn_nopipe;
>            break;
>  
> +        case 'q':
> +          quiet = true;
> +          break;
> +
>          case_GETOPT_HELP_CHAR;
>  
>          case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);

Reply via email to