[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How can redirection operator aka ">" open output in append instead o
From: |
Chet Ramey |
Subject: |
Re: How can redirection operator aka ">" open output in append instead of ordinary write mode? |
Date: |
Thu, 16 May 2019 16:57:06 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 5/16/19 4:25 PM, howaboutsynergy@protonmail.com wrote:
> Hi. Would bash devs even consider replacing the current behaviour of ">"
> (redirection) to do the equivalent of the following(under the hood) ?
I doubt it. That's not how it's defined to behave, and there's no good
reason to do it.
>
> When:
> `command > $somewhere`
>
> then actually do(under the hood):
> : > $somewhere
> command >> $somewhere
>
>
> ie. create&truncate file, then open it in append mode and redirect to it,
> instead of what it currently does(aka not append).
Why not just use the version you supply above in the cases where it
matters?
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
signature.asc
Description: OpenPGP digital signature