Re: [PATCH v3 (resend)] tee: Add -q, --quiet, --silent option to not write to stdout

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

 



Am 24.01.2021 um 13:18 schrieb Alejandro Colomar:
> 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;

Why don't you just do

echo foo > /etc/foo

or

sudo sh -c 'echo foo > /etc/foo' ?

I don't normally use sudo, so there might be some better way of using it.

Kind regards,
Philipp



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux