Re: How to convert from Mac text files to Linux text files??


Subject: Re: How to convert from Mac text files to Linux text files??
From: Bryan Stillwell (arcane@verinet.com)
Date: Mon Nov 29 1999 - 11:39:17 MST


Get the program dos2unix, it'll convert either dos or mac text files to
the unix format. Here's where you can get the rpm:

http://rufus.w3.org/linux/RPM/freshmeat/dos2unix/dos2unix-3.0-1.ppc.html

There's also a unix2dos program that will convert it back to the mac/dos
text format.

You might be able to automate this by setting up an alias in your .bashrc
file. I don't know how exactly you could do this, but I imagine it would
be close to this:

alias myvi="dos2unix $1;vi $1;unix2dos $1";

(Note: That doesn't work. Does someone who is better at bash care to
correct it?)

Bryan

On Mon, 29 Nov 1999, D W wrote:

> While browsing the Web under MacOS w/ Netscape 4.x,
> I'll, for example, select some text from a page, Cmd-C
> copy it, then Cmd-V paste it into a Word doc. I'll
> then save the Word doc as Text or Text w/ Linefeeds
> format.
>
> If I then reboot under Linux and mount the MacOS partition
> containing the saved Word doc, then open the saved doc
> with vi in a KDE terminal (kvt), vi displays all the
> line feeds as: "^M" .
>
> Is there some way I can either save text files under MacOS,
> or open/read MacOS text files under Linux and have the
> CR/LF's show up as CR's and not: "^M" 's ?
>
> (I'd like to be able to save my Mac Word docs as text
> and not have to run each one through some regex process if
> possible).



This archive was generated by hypermail 2a24 : Fri Dec 03 1999 - 19:07:33 MST