Re: Getting rid of Control-M in a file?
On Sun, Mar 18, 2001 at 06:56:15AM -0600, Bud Rogers wrote:
> On Sunday 18 March 2001 03:03, kmself@ix.netcom.com wrote:
> > on Sun, Mar 18, 2001 at 12:12:44AM -0800, Lars Jensen
> (jensen@scs.unr.edu) wrote:
> > > How do I get rid of Control-M at the end of each line in a dos
> > > text file imported to Debian?
> >
> > 1. select ASCII mode for your FTP transfers.
> > 2. dos2unix myfile
>
> What package are dos2unix and unix2dos in? I couldn't find them on my
> system, so I cooked up a couple of little perl scriptlets to do the
> same thing.
A) dkpg -S 'path/sub/string'
B) using VIM, check out
:set ff
to be sure it knows you've got a DOS ^M^J file, then
:set ff=unix
and <theory> you're done. </theory>
of course, if you've got a scad of dos files, perl would be the
way i'd go, too.
--
It is always hazardous to ask "Why?" in science, but it is often
interesting to do so just the same.
-- Isaac Asimov, 'The Genetic Code'
will@serensoft.com
http://newbieDoc.sourceforge.net/ -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!
Reply to: