[Top][All Lists]

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

Re: Is there a way to force here-documents/strings to use temporary file

From: Chet Ramey
Subject: Re: Is there a way to force here-documents/strings to use temporary files?
Date: Sun, 20 Dec 2020 15:53:32 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.5.1

On 12/20/20 2:25 AM, Oğuz wrote:

So, is there any way to force here-documents to use temporary files no
matter how long the expanded document is? If not, it would be nice if
compat50 had this effect.

There is not. I'm not sure that a compat setting would be appropriate for
something that is purely an implementation issue.

There was a fairly extensive discussion that preceded this change, starting


and continuing the next month (!) with


One can argue that the concerns on either side (seeking on stdin vs.
assuming that here-strings will never hit the file system) are assumptions
that should not be made, for instance


I decided ultimately to make the change for the most common cases, where
the amount of data passed in a here string or here document is small. But
that is simply an implementation detail; the documented semantics of here-
documents and here-strings aren't changed.

``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/

reply via email to

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