Prepending Data to a File
- To: mathgroup at smc.vnet.net
- Subject: [mg116807] Prepending Data to a File
- From: Gregory Lypny <gregory.lypny at videotron.ca>
- Date: Tue, 1 Mar 2011 05:20:51 -0500 (EST)
Hello everyone, I have a big multi-line, comma-delimited data file. How would I prepend new data to it, that is, insert new lines, generated in Mathematica, at the beginning of the file without importing the file into Mathematica? Suppose my file myData.csv contains 31,32,33 41,42,43 51,52,53 and I've now generated these two new lines (lists) in Mathematica 11,12,13 21,22,23 I'd like to prepend those two lines to myData and end up with 11,12,13 21,22,23 31,32,33 41,42,43 51,52,53 I'm guessing that the Write function would do the trick, but I'm not sure about the syntax. Regards, Gregory