I'm using Mathematica on a Raspberry Pi and I'm done with calculations at the moment. I'd like to save this but there isn't a way to do it like there is for PC version (File -> Save). How can I save this file?
Asked
Active
Viewed 67 times
1 Answers
4
We can save all current definitions in the Global context with this
Save[ "tmp.wl", "Global`*"]
We can open the "tmp.wl" file like a notebook in the MMA, or get the definitions back in a later command line session like this
Get["tmp.wl"]
We can use any file name and extension we like.
See the Save documentation for saving only specific variables.
Note that this does not save your entire session, but only the current definitions.
LouisB
- 12,528
- 1
- 21
- 31
tmp.m? – Szabolcs Dec 23 '19 at 09:43tmp.nbon a Raspberry Pi and was a little surprised that it worked so I went with it without thinking it through. Later I realizedtmp.wlwould be better. I'm changing my answer to reflect your comment and my preference to use the.mextension only for Matlab files. Thank you. – LouisB Dec 23 '19 at 11:15