I try to parse the output of terraform output like this:
terraform output -json all_admins |
sed -e "s/,/;\n/g" -e "s/^(\[|\])//g"
terraform output -json all_admins
leads to:
["admin1@admin.com","admin2@admin.com"]
Current result:
terraform output -json all_admins |
sed -e "s/,/;\n/g" -e "s/^(\[|\])//g"
leads to:
["admin1@admin.com";
"admin2@admin.com"]
Exptected result:
"admin1@admin.com";
"admin2@admin.com"
How can I elegantly get rid off [ and ] with a regex in sed?