[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Does this line create a subshell?
From: |
Chet Ramey |
Subject: |
Re: Does this line create a subshell? |
Date: |
Mon, 23 May 2022 11:42:03 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 |
On 5/22/22 8:37 PM, Robert E. Griffith wrote:
Thanks, I guess I was hoping that there would be some magic that optimize
out the subshell and the redirection if both ends were builtins but I am
not surprised there's not.
This has come up before. The problem is that this kind of "optimization"
violates the semantics of the operators. For example, <(command) is
required to expand to a filename regardless of the context, and input
redirection requires a filename to open and read from. Special-casing
this isn't worth the effort.
--
``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/