Removing Backslash with Sed

Cameron Simpson cs at
Thu Sep 7 22:56:38 UTC 2006

On 07Sep2006 16:52, Mikkel L. Ellertson <mikkel at> wrote:
| sed -i -e 's@\\@/@g' filename

Or better, the y operator:

  sed 'y|\\|/|'

It's character based - probably faster that the regexps used by s/...
But tr is better still:

  tr '\' '/' <oldfile >newfile

Cameron Simpson <cs at> DoD#743

Chaos reigns within.
Reflect, repent, and reboot.
Order shall return.
- Haiku Error Messages

More information about the users mailing list