On Sat, Dec 26, 2020 at 10:16 AM Fabrice BAUZAC <n...@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! -Alex