help-bash
[Top][All Lists]
Advanced

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

Re: is there a way to save stdout and stderr to two bash variables?


From: Chet Ramey
Subject: Re: is there a way to save stdout and stderr to two bash variables?
Date: Tue, 12 May 2020 10:13:55 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

On 5/12/20 6:23 AM, Peng Yu wrote:

>     Theoretically, I don't think you can assume that a here-document can be
>     stored in RAM as its size is only limited by the storage medium that
>     hold the script that it is part of.
> 
> 
> I am not sure this statement is relevant to most real usage. I mostly use
> heredoc for short strings, it would be costly to use external files instead
> of in memory strings.

By the same logic, since the historical bash implementation of here
documents and here strings uses temp files, the concerns about performance
are mostly exaggerated.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

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