I have a template Hello NAME welcome and want to replace NAME with data like Judy&Mary.Why does this not work?TEMPLATE=Hello NAME welcomeDATA=Judy&Maryecho $TEMPLATE | sed -e s/NAME/$DATA/Hello JudyNAMEMary welcomeHow can I escape the & character?
Escape ampersand in bash variable used as a sed argument
bash;sed