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: L A Walsh
Subject: Re: [PATCH v3 (resend)] tee: Add -q, --quiet, --silent option to not write to stdout
Date: Wed, 27 Jan 2021 03:30:58 -0800
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)



On 2021/01/27 00:15, Christian Groessler wrote:

What is so difficult with

$ echo "3" | sudo sh -c "cat > proc/sys/vm/dropcache"

I don't get it...

regards,
chris
---- well, if you have 'sh' it might work, but it also might
run some "rc" script.
In some cases I've seen some people have their 'sudo' reset
HOME (BTW, you likely want a '/' before proc).

Some shells will use temporary files for the communications rather
than pipes. That could open various chances for race conditions, more so in the past than these days.

I've seen more than one installation of 'sudo' disallow the running of another shell and some try to drop privileges if the 1st progam run execs another program.

Normally, it may not be a problem on "your" system or on
"my" system, but in general?

Quoting the '>' to get the behavior you want seems
a bit strained, even though it might work.

I probably wouldn't _expect_ it to work on a random system that I was on unless I'd verified it to work.




reply via email to

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