bash to replace string code example
Example 1: bash replace substring
echo [string] | sed "s/[original]/[target]/g"
Example 2: HOW TO REPLACE A CHARACTER FROM A STRING IN BASH
string="abc"
final=${string//[a]/b}
echo $final
echo [string] | sed "s/[original]/[target]/g"
string="abc"
final=${string//[a]/b}
echo $final