[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to assign one associative array to another?
From: |
Peng Yu |
Subject: |
How to assign one associative array to another? |
Date: |
Tue, 30 Mar 2021 12:47:01 -0500 |
Hi,
I use the following way to assign one associative array to another.
But it is a little hacky. Is there a better to do an associative array
assignment? Thanks.
declare -A x=([a]=1 [b]=2)
source <(declare -p x | sed 's/\<x\>/y/')
--
Regards,
Peng
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- How to assign one associative array to another?,
Peng Yu <=