From: anne001 Date: 2005-11-24T03:17:26+09:00 Subject: Re: Parsing excel CVS data on a mac OSX to extract blocks of cells I have moved onto Tiger. Still much installing to do. Sorry in the delay in processing your responses. The line ending is extremely simple, http://www.delorie.com/gnu/docs/emacs/emacs_220.html ....-unix newline to separate lines. ....-dos carriage-return + linefeed to separate lines ....-mac carriage-return to separate lines But the editors show what they want. Text wrangler lets you replace \r with \n but when you look, it still looks as a \r. Did it make the substitution? Emacs has a command to change the file to unix. But the ^M are not changed. Did something change? hard to say. So I gave up on that. I like the command, thank you ruby -p -i.bak -e 'sub("\r", "\n")' your_csv_file_here.csv It seems to work, it creates your_cvs_file_here.csv.bak and csv read no longer gives an error, but... It seems to parse each cell, with realms of NIL in between bits of text. Conceptually I think it is easier to process line by line. But I will look into CVS to see what it can do. In any case, I can combine the ruby line command with the readlines ruby function. So I should be OK.