Q:

Is there a way to change/clean a variable inside a for cicle loop in a shell script?

RD_OPTION_AZWEBAPPNAME="01-SM1,02-SM1Touch,03-Data"
for i in $(echo $RD_OPTION_AZWEBAPPNAME | sed "s/,/ /g");
    do
          /bin/az group deployment create --name Template2020 --RD_OPTION_AZWEBAPPNAME=$i

With this command I create 3 APP with 01-SM1 02-SM1Touch, 03-Data but I need to insert a piece of this array in another parameter in order to have SM1 SM1Touch Data withot the number and the "-" before the APP name INSIDE a for cicle, like below
 RD_OPTION_AZWEBAPPNAME="01-SM1,02-SM1Touch,03-Data"
for i in $(echo $RD_OPTION_AZWEBAPPNAME | sed "s/,/ /g");
    do
          /bin/az group deployment create --name Template2020 --RD_OPTION_AZWEBAPPNAME=$i --webappconf=$WEBAPPNAMEWITHOUTNUMBERANDMINUSBEFORE

A:

 for i in $(echo $RD_OPTION_AZWEBAPPNAME | sed "s/,/ /g");
 do
    echo $i
    export AZWEBAPPNAMENONUMBER=`echo "$i" | cut -c 4-`

This is the way I decided.

