|
[Date Index]
[Thread Index]
[Author Index]
Re: Read last expression in a file?
- To: mathgroup at smc.vnet.net
- Subject: [mg116053] Re: Read last expression in a file?
- From: Heike Gramberg <heike.gramberg at gmail.com>
- Date: Mon, 31 Jan 2011 03:22:57 -0500 (EST)
If you are working on unix/linux/os x and your output file contains one expression per line, you could use something like
ReadList["!tail outputfile", Expression]
where outputfile is the name of your output file. This basically calls the external command tail which is a program on unix/linux that displays the last few lines of a file.
I'm not familiar with windows so I don't what the windows equivalent of tail would be.
Heike.
On 30 Jan 2011, at 00:43, Ramiro wrote:
> Hello,
>
> I wrote a program that generates a lot of Mathematica output.
>
> Now I need to restart it using the very last expression of such output
> as the new input. However, I can't find a way to only read the last
> expression in a file, something like a Read that would start at the
> end. It would be too time consuming and perhaps not enough memory in
> my computer to read the entire file.
>
> Any suggestions?
>
> Thanks,
> Ramiro
>
Prev by Date:
Re: Problems integrating InterpolatingFunction
Next by Date:
Re: loops in mathematica
Previous by thread:
Read last expression in a file?
Next by thread:
Problems integrating InterpolatingFunction
|