home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!mcsun!news.funet.fi!ajk.tele.fi!funic!convex!vsarkela
- From: vsarkela@convex.csc.FI (Vesa S{rkel{)
- Subject: Re: stripping cr/lf's
- Message-ID: <1992Dec31.173940.3324@nic.funet.fi>
- Sender: usenet@nic.funet.fi
- Nntp-Posting-Host: convex.csc.fi
- Organization: Finnish Academic and Research Network Project - FUNET
- References: <1992Dec31.071312.6153@netcom.com> <1992Dec31.165409.23109@mnemosyne.cs.du.edu>
- Date: Thu, 31 Dec 92 17:39:40 GMT
- Lines: 32
-
- In <1992Dec31.165409.23109@mnemosyne.cs.du.edu> jefouger@nyx.cs.du.edu (Jim Fougeron) writes:
-
- >kasajian@netcom.com (Kenneth Kasajian) writes:
-
-
- >>How do I strip the cr's from a text file? There must be a standard
- >>unix way of doing it!
- >>thanks
-
- >I perform this task with a utility from Omen (rz/sz people) called undos.
- >This program will convert files from dos-unix-mac-cpm.
- >If you wanted to do this ONLY using standard Unix commands, one way is:
- >tr -d '/15' < infile > outfile
-
- this should be tr -d '\15' <infile >outfile
- or tr -d 13 <infile >outfile
- (carriage retun = 13 decimal = 15 octal = 0D hexadecimal)
-
- >NOTE: Do not do this on anything other than PLAIN text, or you will end up
- > with a corrupted output file.
- >Hope this helps.
-
- you are welcome
-
- >--
- >---------------------------------------------------------------------------
- >| Jim Fougeron | What is the true meaning of happiness? |
- >| jefouger@nyx.cs.du.edu | Is it money, cars and women, ... or |
- >| jimfn@ids.net | just money and cars? Calvin & Hobbes |
-
- Vesa Sarkela Keskuslaboratorio Oy
- vsarkela@convex.csc.fi Finnish Pulp & Paper Research Institute
-