|
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=noneThose 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.txtThat 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
[Prev in Thread] | Current Thread | [Next in Thread] |