Thanks.
>>> amonk@gnutec.com 01/08/02 03:23PM >>>
To change every line at once, use vi as follows...
:%s/$/^M$/g
To automate it in a script, use sed as follows...
sed 's/$/^M/g' /foo/fucked > /bar/fixed
Note that the ^M characters are made by pressing CTRL-V followed by
CTRL-M in each case.
-- Kyle
On Tue, 8 Jan 2002 13:02:12 -0500
"Mikes work account" <mrock@stewartsigns.com> wrote:
> There is an old unix command that will do that for you. I believe it is
> dos2unix or something like that. Try this site for the command.
>
> http://www.megaloman.com/~hany/RPM/dos2unix.html
>
> Michael C. Rock
>
> -----Original Message-----
> From: slug@lists.nks.net [mailto:slug@lists.nks.net]On Behalf Of Brett
> Simpson
> Sent: Tuesday, January 08, 2002 11:34 AM
> To: slug@nks.net
> Subject: [SLUG] Adding a carriage return after each line in a file.
>
>
> Hi,
>
> Is it possible to add a carriage return after each line in a file? I
> know in
> vi you can use CTRL-V to add a <CR> but I'm not sure how to automate it
> to
> do it after each line. Each line is 856 bytes in size and corresponds to
> a
> record. Also is their a way to do this from a script so I can automate
> through cron every day. Thanks.
>
> Brett
>
>
>
>
-- Kyle Amon (TM) voice: 813-979-1633 email: amonk@gnutec.com Kyle Amon, Inc. fax: 813-977-5843 web: http://gnutec.com/~amonk icq: 46479255 KeyID 1024D/4EB96E44 Key fingerprint = E9EC 0046 8487 23D7 C91C D757 7B2A 8AE9 4EB9 6E44"I decry the current tendency to seek patents on algorithms. There are better ways to earn a living than to prevent other people from making use of one's contributions to computer science."
-- Donald E. Knuth, TAoCP vol 3
This email Copyright 2001 by Kyle Amon, Inc., a Florida corporation, 6002 Palm Shadow Way, Suite 1218, Tampa, FL 33647: (813) 979-1311 amonk@gnutec.com http://www.gnutec.com/~amonk. All rights Reserved.
-- This message has been 'sanitized'. This means that potentially dangerous content has been rewritten or removed. The following log describes which actions were taken.
Sanitizer (start="1010525079"): Split unusually long word(s) in header. SanitizeFile (filename="unnamed.txt", mimetype="text/plain"): Match (rule="default"): Enforced policy: accept
Total modifications so far: 1
Anomy 0.0.0 : Sanitizer.pm $Id: Sanitizer.pm,v 1.32 2001/10/11 19:27:15 bre Exp $
This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:25:32 EDT