coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] tee: Add -q, --quiet option to not write to stdout


From: Jeffrey Walton
Subject: Re: [PATCH] tee: Add -q, --quiet option to not write to stdout
Date: Thu, 21 Jan 2021 12:41:13 -0500

On Thu, Jan 21, 2021 at 9:33 AM Alejandro Colomar
<alx.manpages@gmail.com> 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
>
> Example:
>
> echo 'foo' | sudo tee -q /etc/foo;
>
> is equivalent to the old (and ugly)
>
> echo 'foo' | sudo tee /etc/foo >/dev/null;
>
> ....
> Testing:
>
> $echo 'foo' | ./src/tee -q bar;
> $cat bar;
> foo
>
> $echo 'fu' | ./src/tee --quiet baz;
> $cat baz;
> fu

If you accept --quiet, then you are supposed to accept --silent, too.
Also see https://www.gnu.org/prep/standards/html_node/Option-Table.html.

Jeff



reply via email to

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