coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] tee: Add -q, --quiet option to not write to stdout


From: Christian Groessler
Subject: Re: [PATCH] tee: Add -q, --quiet option to not write to stdout
Date: Thu, 21 Jan 2021 15:43:56 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

Hi Alejandro,

On 1/21/21 2:17 PM, Alejandro Colomar wrote:
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;


What's bad with

echo foo |  sudo sh -c "cat > /etc/foo" ?

regards,
chris





reply via email to

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