coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] tee: add a -q/--quiet option


From: Pádraig Brady
Subject: Re: [PATCH] tee: add a -q/--quiet option
Date: Sat, 26 Dec 2020 22:34:31 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Thunderbird/84.0

On 26/12/2020 21:22, Alex Henrie wrote:
On Sat, Dec 26, 2020 at 10:16 AM Fabrice BAUZAC <noon@mykolab.com> wrote:

Why not

   echo foo | sudo sh -c "exec cat > protected.txt"

or

   echo foo | sudo dd of=protected.txt status=none

Those are both very cumbersome commands to type for such a simple and
common operation.

If something is really needed, I would suggest an option to "cat" rather
than "tee":

   echo foo | sudo cat --output=protected.txt
   echo foo | sudo cat -oprotected.txt

That sounds like a great solution. I'll get started on a patch!

Not ideal as you would need options to control appending or truncating.
This would be adding extra incompat, for just another way to do things.
Consequently I'd also not be on for accepting such a change to cat either.

cheers,
Pádraig



reply via email to

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