I am trying to create a locale script in bash to automatically set the lc_ctype to the array and then local-gen. The issue I am facing is appending each array item to the desired locale.declare -a arr=(    NUMERIC,    TIME,    MONETARY,    PAPER,    MEASUREMENT)lc_ctype=en_US.UTF-8for i in ${arr[@]};  do     lc=LC_${i}=$lc_ctype     echo $lc  doneThe output:LC_NUMERIC,=en_US.UTF-8LC_TIME,=en_US.UTF-8LC_MONETARY,=en_US.UTF-8LC_PAPER,=en_US.UTF-8LC_MEASUREMENT=en_US.UTF-8How can I get the output as below without the comma?LC_NUMERIC=en_US.UTF-8LC_TIME=en_US.UTF-8LC_MONETARY=en_US.UTF-8LC_PAPER=en_US.UTF-8LC_MEASUREMENT=en_US.UTF-8
How to append each item in the list using loop?
bash;shell script;locale
Remove commas:declare -a arr=(    NUMERIC    TIME    MONETARY    PAPER    MEASUREMENT)