Re: Associative array keys are not reusable in (( command

2021-01-10 Thread Oğuz
10 Ocak 2021 Pazar tarihinde Chet Ramey yazdı: > So you have got (( assoc[x],b[$(uname >&2)] )), and the shell does exactly > what you think it does with that. > > This is a valid arithmetic expression. The `assoc' is marked as having its > subscript expanded once, since it has. The `b' is not, b

Re: Arithmetic pow results incorrect in arithmetic expansion.

2021-01-10 Thread Chet Ramey
On 1/9/21 12:22 AM, Oğuz wrote: Here's another trivial side effect of implementing unary minus using binary minus: $ echo $((16#-10)) -10 Since `-' is an operator, this is not unary minus. It's the same as $(( 16# - 10 )), which bash before version 5.1 helpfully (or not) treats iden

Re: Arithmetic pow results incorrect in arithmetic expansion.

2021-01-10 Thread Chet Ramey
On 1/8/21 11:19 PM, Hyunho Cho wrote: Bash Version: 5.0 Patch Level: 17 Release Status: release i have tested below in gnome calculator, Qalculate, gawk, perl and all results in -4 but bash is 4 $ awk 'BEGIN { print -2 ^ 2 }

Re: BUG

2021-01-10 Thread Chet Ramey
On 1/10/21 5:07 AM, 劉是磐 wrote: Hi Today I installed a fresh MSYS2 on Windows 10 and followed the instructions in https://docs.qmk.fm/#/newbs_getting_started There were a few packets not installing correctly but I got around this. Now I type 'qmk

Re: Associative array keys are not reusable in (( command

2021-01-10 Thread Chet Ramey
On 1/8/21 10:24 AM, Oğuz wrote: 8 Ocak 2021 Cuma tarihinde Chet Ramey > yazdı: On 1/8/21 5:20 AM, Oğuz wrote: See:      $ declare -A assoc=($'\n\'' 42)      $ for key in "${!assoc[@]}"; do (( assoc[$key]++ )); done      bash:

Re: syntax error: unexpected end of file

2021-01-10 Thread Chet Ramey
On 1/10/21 1:28 PM, wael-zwai...@gmx.com wrote: bash: /home/hagbard/Genadm/build/gungadin-1.0/sysrc/gungadin.rc: line 455: syntax error: unexpected end of file This happens when I use quick-grepot-Hirn () { find "$4" -name "*.org" -name "*.texi" -print0 \ | xargs -0 -n1 -P0 /bin/gr

syntax error: unexpected end of file

2021-01-10 Thread wael-zwaiter
I have a bash script which works with quick-grepot-Hirn () { find "$4" -name "*.org" -name "*.texi" -print0 \ | xargs -0 -n1 -P0 /bin/grep --color="auto" -Hirn "$1" "$2" "$3" } But get the error bash: /home/hagbard/Genadm/build/gungadin-1.0/sysrc/gungadin.rc: line 455: syntax error:

Re: non-executable files in $PATH cause errors

2021-01-10 Thread Eli Schwartz
On 1/10/21 10:49 AM, Ángel wrote: On 2021-01-10 at 08:52 +0100, n952162 wrote: Hello, I consider it a bug that bash (and its hash functionality) includes non-executable files in its execution look-up and then (inevitably) simply reports an error, because its such files aren't executable. Perh

Re: non-executable files in $PATH cause errors

2021-01-10 Thread Ángel
On 2021-01-10 at 08:52 +0100, n952162 wrote: > Hello, > > I consider it a bug that bash (and its hash functionality) includes > non-executable files in its execution look-up and then (inevitably) > simply reports an error, because its such files aren't executable. > > Perhaps it's there to suppo

BUG

2021-01-10 Thread 劉是磐
Hi Today I installed a fresh MSYS2 on Windows 10 and followed the instructions in https://docs.qmk.fm/#/newbs_getting_started There were a few packets not installing correctly but I got around this. Now I type 'qmk setup' in MSYS2 MinGW 64-bit terminal and it shows this error: $ qmk setup ERROR:

non-executable files in $PATH cause errors

2021-01-10 Thread n952162
Hello, I consider it a bug that bash (and its hash functionality) includes non-executable files in its execution look-up and then (inevitably) simply reports an error, because its such files aren't  executable. Perhaps it's there to support PATH look up for arguments to the bash command.  That w