bug-bash
[Top][All Lists]
Advanced

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

bash 5.0 nested array subscript arithmetic expansion error


From: Grisha Levit
Subject: bash 5.0 nested array subscript arithmetic expansion error
Date: Mon, 27 Aug 2018 12:25:30 -0400

This used to work:

bash-4.4$ a=0
bash-4.4$ echo $(( a[a[0]] ))
0
bash-4.4$ echo ${a[a[a[0]]]}
0

But is broken in bash-5.0:

bash-5.0$ a=0
bash-5.0$ echo ${a[a[a[0]]]}
bash: a[a[0]]: syntax error: invalid arithmetic operator (error token is "]")
bash-5.0$ echo $(( a[a[0]] ))
bash: a[a[0]] : syntax error: invalid arithmetic operator (error token is "] ")



reply via email to

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