Re: Removing Backslash with Sed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07Sep2006 16:52, Mikkel L. Ellertson <mikkel@xxxxxxxxxxxxxxxx> 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

Cheers,
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

Chaos reigns within.
Reflect, repent, and reboot.
Order shall return.
- Haiku Error Messages http://www.salonmagazine.com/21st/chal/1998/02/10chal2.html


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux