I have a list
of points (e.g. {1.2,0.4}
) which I export to a file using
Export[fileName, list];
I want to add a line before the end of file. For instance instead of ending the file with
1.236677 4.64567567
1.236677 4.64567567
1.236676 4.64567567
ending like
1.236677 4.64567567
1.236677 4.64567567
1.236676 4.64567567
# a blank line here
I tried appending {}
, {,}
, ""
to the list, but none of them added a blank line.
I need this because xmgrace is not parsing the last line of the exported mathematica file: it expects a blank line before the End of File.
EDIT: As pointed out in the comments by Kuba and Pinguin Dirk, appending ""
works on Windows XP (and probably others.) I'm using OS X.
Answer
Here, on my OSX the following works
Export["tmp/foo.txt", Append[Range[10], "\n"]]
Comments
Post a Comment