help-bash
[Top][All Lists]
Advanced

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

Re: Is there a way to get the output of a function without an extra bash


From: Chet Ramey
Subject: Re: Is there a way to get the output of a function without an extra bash process?
Date: Mon, 11 May 2020 08:21:37 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

On 5/10/20 6:43 PM, Peng Yu wrote:
> Hi Chet, Could a new feature be added to bash so that no exec is
> needed in the case of $(cmd). Maybe introducing a new syntax like $(:
> cmd)?

I assume you mean no fork. I've thought about this a little, but there is
a lot of state that would have to be saved and restored to preserve the
subshell environment semantics of command substitution. I haven't done
anything to implement that.

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