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 with https://lists.gnu.org/archive/html/bug-bash/2019-03/msg00073.html and continuing the next month (!) with https://lists.gnu.org/archive/html/bug-bash/2019-04/msg00007.html 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 https://lists.gnu.org/archive/html/bug-bash/2019-03/msg00075.html or https://lists.gnu.org/archive/html/bug-bash/2019-03/msg00082.html 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 c...@case.edu http://tiswww.cwru.edu/~chet/