coreutils
[Top][All Lists]
Advanced

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

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


From: Philipp-Joachim Ost
Subject: Re: [PATCH v3 (resend)] tee: Add -q, --quiet, --silent option to not write to stdout
Date: Mon, 25 Jan 2021 17:06:24 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4

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



reply via email to

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