Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Unix and Windows line break formats' topicStudent Support Forum > General > "Unix and Windows line break formats"

Next Comment >Help | Reply To Topic
Author Comment/Response
Bianca Eifert
09/01/11 12:46pm

Hi,

I wrote a little Mathematica program which can plot and manipulate crystal structures and also export them to several different file formats. One of these export types creates a .dat file which can be directly used as input for an ab-initio density functional theory program I use. However, this ab-initio program runs on a Unix cluster and does not understand input files with Windows line breaks, but my personal computer runs on Windows, so naturally, Mathematica exports files with Windows line breaks. I do have a text editor which can easily change the line break format (PlainEdit), but it's somewhat cumbersome that I have to remember to do that every time.

Is there any way to force Mathematica to export a .dat file with an arbitrary line break format? I already tried setting the CharacterEncoding option, but that still produces Windows line breaks in all cases.

The export function is basically:
Export["name.dat",contents,"FieldSeparators"->" "]
where "contents" is a 2d array of numbers and strings.

I hope someone can help me with this.

Regards, Bianca

URL: ,

Subject (listing for 'Unix and Windows line break formats')
Author Date Posted
Unix and Windows line break formats Bianca Eifert 09/01/11 12:46pm
Re: Unix and Windows line break formats Ralph Dratman 09/07/11 09:03am
Re: Re: Unix and Windows line break formats Bianca Eifert 09/08/11 02:50am
Re: Unix and Windows line break formats Ralph Dratman 09/07/11 12:00pm
Re: Re: Unix and Windows line break formats Bianca Eifert 09/08/11 03:00am
Re: Unix and Windows line break formats Bianca Eifert 09/08/11 04:16am
Next Comment >Help | Reply To Topic