Let\'s suppose I have this variable:
DATE=\"04/Jun/2014:15:54:26\".
DATE=\"04/Jun/2014:15:54:26\"
Therein I need to replace / with \\/ in order to
/
\\/
here you go:
kent$ echo "04/Jun/2014:15:54:26"|sed 's#/#\\/#g' 04\/Jun\/2014:15:54:26
your tr line was not correct, you may mis-understand what tr does, tr 'abc' 'xyz' will change a->x, b->y, c->z,not changing whole abc->xyz..
tr
tr 'abc' 'xyz'
a->x, b->y, c->z
abc->xyz