Dnia piątek, 20 sierpnia 2021 17:15:43 CEST Paul Eggert pisze:
> On 8/20/21 7:52 AM, Krzysztof Żelechowski wrote:
> >> echo hello >a
> >> ln a b
> >> gzip -k b && gzip -cd b.gz >>b
> >> 
> >> This would trash 'a' if gzip -k succeeded. (Same with 'ln -s'.)
> > 
> > The appending redirection operator has nothing to do with gzip.
> 
> That's true even without -k: if plain 'gzip b' succeeded in this case,
> any problem that the user ran into later would have nothing to do with
> gzip. Plain 'gzip b' ignores 'b' here, not because compressing 'b' would
> cause any problem with gzip itself, but because it could cause confusion
> *later*.

If plain { gzip b; } succeeded, we have a problem because [a] is compressed 
but not renamed.

Chris








Reply via email to