This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / System Interface / External Commands  /

  • expr >> filename writes expr to a file.
  • Put[ , , ... , " filename "] writes a sequence of expressions to a file.
  • On systems with advanced graphical interfaces, there will usually be graphical tools for saving expressions in files.
  • Put uses the format type InputForm by default.
  • Put starts writing output at the beginning of the file. It deletes whatever was previously in the file.
  • Put inserts a newline (line feed) at the end of its output.
  • expr >> filename is equivalent to expr >> " filename ". The double quotes can be omitted if the file name is of the form specified in Section¬†A.2.7.
  • It is conventional to use names that end with .m for files containing Mathematica input.
  • See the Mathematica book: Section 1.11.1, Section 1.11.10,¬†Section 2.11.1.
  • See also: Save, Definition, DumpSave, Get, NotebookPut.

    Further Examples

    This puts the expanded polynomial into the file tempput.


    Here are the contents of the file tempput.


    a^3 + 3*a^2*b + 3*a*b^2 + b^3