If Conditional Logic Error in Bash

2022-11-23 Thread Neko-san via Bug reports for the GNU Bourne Again SHell
Example: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=unreal-engine=c866141788f5c52cd32ddfaea3e8f5f5ca57b3ae#n135 There's a logic bug at play in Bash where having a value optionally be either a string (in this case true/false) or an integer, checked by an if statement, can throw an

read builtin: timeout setting valid is next read

2022-11-23 Thread Csaba
Hello! If I use timeout with read shell command, next read command use it too. See my test shell program: #!/bin/bash read -rest 2 od -An -tx1 <<<"${REPLY}" read -ren2 -p $'---\nIs this OK? [y/N] ' echo od -An -tx1 <<<"${REPLY}" [ x"${REPLY,}" != x'y' ] && exit 1

Re: If Conditional Logic Error in Bash

2022-11-23 Thread Chet Ramey
On 11/23/22 5:31 AM, Neko-san via Bug reports for the GNU Bourne Again SHell wrote: Example: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=unreal-engine=c866141788f5c52cd32ddfaea3e8f5f5ca57b3ae#n135 There's a logic bug at play in Bash where having a value optionally be either a string

Re: read builtin: timeout setting valid is next read

2022-11-23 Thread Chet Ramey
On 11/23/22 7:52 AM, Csaba wrote: Hello! If I use timeout with read shell command, next read command use it too. Thanks for the report. https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00035.html -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars