Unix Add Suffixes with SED February 15, 2022 techtuga Leave a comment suffix1="<"; suffix2=">"; VARIABLE="aaa,bbb,ccc"; echo ${VARIABLE} | sed -E "s/([^,]+)/\1${suffix2}/g" | sed -E "s/([^,]+)/${suffix1}\1/g" | sed -E "s/,/;/g" | sed -E "s/$/;/"