I\'m working on a bash-script that has to prepare an E-Mail for being sent to a user.
It aggregates some data, which ends up being multiple lines of stuff. For the e
I would suggest simply replacing sed with perl command like this:
perl -i.bak -pe 's/_data_/$ENV{"DATA"}/g' mail.tpl