[Top][All Lists]

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

Re: [Help-bash] Why `$(<` is slow?

From: Stephane Chazelas
Subject: Re: [Help-bash] Why `$(<` is slow?
Date: Sat, 31 Aug 2019 10:55:12 +0100
User-agent: NeoMutt/20171215

2019-08-30 21:27:32 -0500, Peng Yu:
> > Bash parses the command and makes sure it's a valid redirection instead
> > of doing it lexically. That happens in the subshell just like any other
> > command substitution.
> Could you consider removing the overhead to make $(< lightweight like
> many other shells? Thanks.

I would second that.

Note that as noted at

not forking has other implications like in


where the modification of $n is preserved.

I wouldn't expect changing the behaviour to have a negative
impact. If anything, that would improve compatibility with other
shells including the original implementation of that operator in

It would be worth documenting that $(<...) is *not* command
substitution and doesn't involve a subshell (any longer in
bash after the change).


reply via email to

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