add cr/lf carriage return line feed crlf
What is this stuff?
If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):
From: Jean-Pierre Radley <firstname.lastname@example.org> Subject: Re: ADD CR/LF TO FILE Date: Sat, 13 Oct 2001 00:48:30 GMT References: <email@example.com>
<9q81tu$n5aeh$1@ID-105888.news.dfncis.de> Bob Meyers propounded (on Fri, Oct 12, 2001 at 05:29:22PM -0700): | "Jim Mohr" <firstname.lastname@example.org> wrote in message | news:meLx7.3134$Y8.email@example.com... | | > "Dale Stover" <firstname.lastname@example.org> wrote in message | > news:email@example.com... | > | > > HI! I am looking for a unix utility that will copy a file blocked | > > at 2048 | > > with no end-of-record delimitor to a file that has records of 2048 | > > plus a cr&lf. | > | > Install Perl and stuff like this becomes 1 and two liners. | | If you have a c compiler, one could write a small c program to do | it. I don't no where I got it (some SCO product) but for many years I | have had a little filter set called "addcr" and "rmcr". I always copy | it to any new server I do. It is just like cat but adds/removes a CR | to NL. If you don't find a solution, email me and I'll send it along.
Well, your little program is not what he needs, because the file he has to work with has NO NEWLINES in the first place, so I suspect your addcr/rmcr would not do what he wants, which is to add a NL/CR after every 2048 bytes in the input. Your addcr/rmcr, though, is all done by my one single file called cr+-: : cr+- # adds CRs if not present, strips them if present # note: if you just cat this file, you miss its essence # if you cat -v this file, you see the _real_ ^Ms in it sed ' s-^M--g t s+$+^M+ t ' -- JP
Got something to add? Send me email.
(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version
Increase ad revenue 50-250% with Ezoic
Inexpensive and informative Apple related e-books:
Take Control of Upgrading to Sierra
Take Control of Numbers
Take Control of Apple Mail, Third Edition
Take Control of the Mac Command Line with Terminal, Second Edition
Are Your Bits Flipped?