On Thursday 14 February 2002 05:17, Franki wrote: > Hi all, > > I have many perl scripts in a directory that all contain windows > control characters.. > > I would like to make a shell script or something that will go > through all the files in a directory, (and any sub directores) > grep every file for ^M characters and swap them for their unix > equivalent.... > > has anyone ever done this? > > PS, the only txt editor that allowed me to see the ^M's was vi, > pico and others did not show them.. why is that?
On Thursday 14 February 2002 05:17, Franki wrote: > Hi all, > > I have many perl scripts in a directory that all contain windows > control characters.. > > I would like to make a shell script or something that will go > through all the files in a directory, (and any sub directores) > grep every file for ^M characters and swap them for their unix > equivalent.... > > has anyone ever done this? > > PS, the only txt editor that allowed me to see the ^M's was vi, > pico and others did not show them.. why is that? AFAIK KWrite doesn't show, but does give the opportunity to, say, search/replace regexps, and change the EOL character. I'm still finding I have the same problem - I converted a ton of Word documents ages ago (with noword, IIRC) but some control characters just won't go, no matter what kind of substitutions I run on them; e.g., s/t+//g; should get rid of tabs, but doesn't. Or maybe it's just that my Perl programming sucks ;-) Robin -- "Someone who re-invents the wheel will not take driving for granted." Robin Turner IDMYO, Bilkent Universitesi Ankara 06533 Turkey http://www.bilkent.edu.tr/~robin
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
