Piping paths with different types of quotes for slash substitution

view story

http://unix.stackexchange.com – I would like to use sed to convert a path with backslashes to the same path with forward slashes: E.g. I would like to pipe \\path\to\file\ and obtain /path/to/file None of the following commands work, and I can't tell why: First attempt: > echo '\\path\to\file\' | sed 's/\\/\//g' /path o ile/ Second attempt: echo \\path\to\file\ | sed 's/\\/\//g' /pathtofile Third attempt: echo "\\path\to\file\" | sed 's/\\/\//g' dbquote> I get a similar behavior if I try piping to | tr '\' '/' I am looking for the correct answer and if possible, for an explanation of why non (HowTos)