[Zope] Re: [ANN] Epoz 0.8.6 released

Dave Kuhlman dkuhlman at cutter.rexx.com
Sun Dec 5 14:53:30 EST 2004


On Fri, Dec 03, 2004 at 11:18:58PM -0800, Dennis Allison wrote:
> Need I point out that a simple python program can be used to squash the
> dreaded DOC carriage-returns. I'll leave the program as an exercise...
> 
> On Sat, 4 Dec 2004, Anderson wrote:
> 
> > Nate Aune wrote:
> > > The __init__.py file contained in the tarball that I downloaded from
> > > http://mjablonski.zope.de/Epoz/releases/Epoz-0.8.6.tar.gz
> > > is plagued with the dreaded DOS carriage-returns.
> > > 
> > > I.e.
> > > import re^M
> > > import urlparse^M
> > > 
> > > And my hosting provider (zettai.net) doesn't have the cmd line tool dos2unix
> > > installed!
> > 
> > Do they have tr?
> > 
> > I can't remember the exact syntax, its along the lines of:
> > 
> > tr -d '\r' < inputFile > outputFile
> > 
> > 
> > ALthough that would be slow to do unless you script it....
> > 
> > Do you have fromdos/todos installed? (similar to dos2unix etc.)
> > 

Do they have Perl installed?  If so, here is a bash/shell script:


    #!/bin/sh
    perl -pi.bak -e "s/\\r//" $*

Remove the "i.bak" part, if you do not want to produce backup files. 
(Hope none of the back-slashes got removed in the email.)

By "slow", do you mean that you'd have to feed it one file at a
time?  If so, you can feed this script a number of file names (or a
wild-card arg, same thing) at once.

Dave


-- 
Dave Kuhlman
http://www.rexx.com/~dkuhlman


More information about the Zope mailing list