On 4/4/24 9:05 PM, Lawrence Velázquez wrote:
Reproducing my comment [1] for the list:On Apr 4, 2024, at 5:57 PM, Richard Waite <invalid.nore...@gnu.org> wrote: Does variable expansion for here-documents occur in a subshell?Sometimes. When a command requires forking (roughly speaking), its redirections (not just here-documents) are processed after the fork as an optimization.
Not just as an optimization: that's how the Bourne shell did it, so bash has always done it that way for compatibility. -- ``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/
OpenPGP_signature.asc
Description: OpenPGP digital signature