I am passing a value to a .sh file as an argument (the file contains follows).
ESCAPED_REPLACE=$(printf '%s\n' "$1" | sed -e 's+$+\\$+g; s+(+\\(+g; s+"+\\"+g')
echo $ESCAPED_REPLACE
I basically want to replace every $ with \$ and every ( with \(.
If I pass Ver$ify
./code.sh "Ver$ify"
I am getting Ver\$ printed which should be Ver\$ify does anyone know the reason for this?