Re: Arithmetic expansion in rediretion word is evaluated twice

2020-06-03 Thread Chet Ramey
On 6/2/20 9:14 PM, Dale R. Worley wrote: > Chet Ramey 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

Re: Arithmetic expansion in rediretion word is evaluated twice

2020-06-02 Thread Dale R. Worley
Chet Ramey 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 bu

Re: Arithmetic expansion in rediretion word is evaluated twice

2020-06-02 Thread Chet Ramey
On 6/1/20 3:34 PM, Oğuz 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. -- ``The lyf so short, the craft so long to lerne.'' - Chau

Re: Arithmetic expansion in rediretion word is evaluated twice

2020-06-02 Thread Chet Ramey
On 6/2/20 1:18 AM, Oğuz wrote: > Below is the error message from the compilation failure after git pull && > make: You have to run configure again to remake the Makefiles. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Ch

Re: Arithmetic expansion in rediretion word is evaluated twice

2020-06-01 Thread Oğuz
Below is the error message from the compilation failure after git pull && make: variables.o: In function `get_urandom': /home/oguz/.local/src/bash/variables.c:1406: undefined reference to `get_urandom32' variables.o: In function `assign_random': /home/oguz/.local/src/bash/variables.c:1356: undefin

Re: Arithmetic expansion in rediretion word is evaluated twice

2020-06-01 Thread Chet Ramey
On 6/1/20 3:34 PM, Oğuz wrote: > See: > > $ unset foo > $ : <$((foo+=42)) > bash: 84: No such file or directory > $ echo $foo > 84 > > Reproducible on 4.4.20 and 5.0.11, couldn't try on development version > because since the last push it doesn't compile How about an error me