[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: Fri, 30 Aug 2019 18:56:02 +0100
User-agent: NeoMutt/20171215

2019-08-30 09:51:08 -0400, Chet Ramey:
> 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.

By the way Chet, at that
I mention something that might be seen as a bug in bash:

bash-5.0$ echo test > file
bash-5.0$ echo "$(<file # comment
bash-5.0$ echo $(# comment
< file)
bash-5.0$ echo $(< file

OK, but:

bash-5.0$ echo "$(<file
# comment

bash-5.0$ echo $(< file


The $(<file) seems not to be recognised as the $(<file) operator
in the last two cases which seems a bit inconsistent.


reply via email to

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