[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Unnecessary space in 'declare -p' and [@]@A for non-empty associative ar
From: |
Arfrever Frehtes Taifersar Arahesis |
Subject: |
Unnecessary space in 'declare -p' and [@]@A for non-empty associative arrays |
Date: |
Wed, 19 Feb 2020 22:59:26 +0100 |
Notice unnecessary space before closing parenthesis for non-empty
associative arrays (VAR5, VAR6) below:
$ declare -a VAR1=() VAR2=(a) VAR3=(a b)
$ declare -A VAR4=() VAR5=([0]=a) VAR6=([0]=a [1]=b)
$ declare -p VAR{1,2,3,4,5,6}
declare -a VAR1=()
declare -a VAR2=([0]="a")
declare -a VAR3=([0]="a" [1]="b")
declare -A VAR4=()
declare -A VAR5=([0]="a" )
declare -A VAR6=([1]="b" [0]="a" )
$ echo "${VAR1[@]@A}"
declare -a VAR1=()
$ echo "${VAR2[@]@A}"
declare -a VAR2=([0]="a")
$ echo "${VAR3[@]@A}"
declare -a VAR3=([0]="a" [1]="b")
$ echo "${VAR4[@]@A}"
declare -A VAR4=()
$ echo "${VAR5[@]@A}"
declare -A VAR5=([0]="a" )
$ echo "${VAR6[@]@A}"
declare -A VAR6=([1]="b" [0]="a" )
$
(BASH 5.0.16)
--
Arfrever Frehtes Taifersar Arahesis
- Unnecessary space in 'declare -p' and [@]@A for non-empty associative arrays,
Arfrever Frehtes Taifersar Arahesis <=