25 Ocak 2021 Pazartesi tarihinde Chet Ramey <chet.ra...@case.edu> yazdı: > > There has been code to do this for a long time. It's currently tagged for > bash-5.2. If you want to play around with it, look in subst.c for > shouldexp_replacement and its caller, and uncomment them. You'll have to > wait for the next devel branch push for a version that works with multibyte > characters -- that should tell you how long it's been there. >
Great, thanks! 25 Ocak 2021 Pazartesi tarihinde Chet Ramey <chet.ra...@case.edu> yazdı: > > I forgot to mention that since the keys and values are both quoted so they > can be reused, you can copy an associative array using a key-value > assignment like > > declare -A copy > eval copy=( "${assoc[@]@K}" ) So many reputable people contributed to the demonization of `eval' that I don't think I can convince anyone that there's nothing wrong with it anymore. -- Oğuz