Hi mates,
On both, my Cygwin and my Linux box (Debian) I'm experiencing same issue:
I'm working in a shell script with some kind of formatting ids, I want to add a backslash () before a slash occurrence (/).
My sed script is working well at my terminal:
# export someid="314-12345/08"
# echo "${someid}" | sed 's/\//\\\//'
Output:
314-12345\/08
But not as well if i run command substitution:
# someidformatted=`echo "${someid}" | sed 's/\//\\\//'`
sed: -e expression #1, char 9: unknown option to `s'
What I'm missing here?
Thank you in advance.