bug-bash
[Top][All Lists]
Advanced

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

Re: Arithmetic expansion in rediretion word is evaluated twice


From: Dale R. Worley
Subject: Re: Arithmetic expansion in rediretion word is evaluated twice
Date: Tue, 02 Jun 2020 21:14:34 -0400

Chet Ramey <chet.ramey@case.edu> writes:
> On 6/1/20 3:34 PM, Oguz wrote:
>> See:
>> 
>>     $ unset foo
>>     $ : <$((foo+=42))
>>     bash: 84: No such file or directory
>>     $ echo $foo
>>     84
>
> Yes. The redirection is evaluated once for the open and again for the
> error message.

That does seem rather a bug, or at least, a poor error message.  Is it
hard to save the string that was attempted to be opened?

Dale



reply via email to

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