Removing Backslash with Sed

R. G. Newbury newbury at mandamus.org
Fri Sep 8 16:34:30 UTC 2006


Subject: Re: Removing Backslash with Sed

 >On 07Sep2006 16:52, Mikkel L. Ellertson <mikkel at infinity-ltd.com> 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


Yes it is!  Thank you, tr worked nicely on a test file. I'll just stuiff 
it into a for loop and voila done!.

Thanks
Geoff






More information about the fedora-list mailing list