View Single Post
Old 04-24-09, 11:58 AM   #2
Verissi
Premium Member
 
Verissi's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2006
Posts: 99
Macs (and *NIX) save raw ASCII text files with line endings that consist of only line feeds. Windows adds a "carriage return" as well, so if a Windows user opens up a text file in Notepad that just has line feeds, it will display the whole thing as one line. The line feeds are still there, but Windows doesn't see them as sufficient for a line ending (silly, I know).

You can add the carriage returns to your file in a number of ways. My old TiBook isn't running now, but the command I use on my Linux machines to do this is pretty simple:

Code:
sed -e 's/$/\r/' inputfilename > outputfilename
You should be able to open up a terminal window and do the same, or you could probably set up a folder action to do it as well for any files that you drop into that folder.

If you anticipate doing this a lot, you would probably want to make the above into a simple script:

Code:
#!/bin/sh
sed -e 's/$/\r/' $1 > $2
Then call it from the command line like (I named the script addcr):
addcr inputfilename outputfilename
Hope this helps
Verissi is offline   Reply With Quote