遍历Bash Hashmap

时间:2019-03-12 22:10:29

标签: bash hashmap

我在bash中有以下哈希图代码-

{
   "priceAfterTax": 150.00,
   "priceBeforeTax": 130.43,
   "tax": 15.00,
   "taxAmount": 19.57
}

此处的declare -A PUBS PUBS=( "FEE":"[345, 342]" "FOO":"[1, 2, 44]" "BAR":"[23, 67]" ) for pub in "${PUBS[@]}" do PUB_DOMAIN="$pub" CAT="${PUBS[$pub]}" printf "Key is %s" "$PUB_DOMAIN" printf "\n" done 打印值-$PUB_DOMAIN,而不是

这是怎么了?

0 个答案:

没有答案