Escape every character in bash

Solution 1:

This works for me with bsd sed-

echo "I am a jelly donut" | sed 's/./\\&/g'
\I\ \a\m\ \a\ \j\e\l\l\y\ \d\o\n\u\t

and with your string

echo 'Example string 59^!#&$(' | sed 's/./\\&/g'
\E\x\a\m\p\l\e\ \s\t\r\i\n\g\ \5\9\^\!\#\&\$\(