Many commands display their results onto the screen. You may want to put the results into a file for further editing or viewing. Macaulay supports Unix-like redirection of input and output. To put the output from a command into a file, instead of the screen, add to the command line the ``argument'' >myfile, where myfile is the name of the file that Macaulay will use. The spacing is important; there cannot be a space after the >. For example,
% pres j >j.res
This puts the displayed version of the resolution into the file ``j.res'', instead of typing it to the screen.
Another important use of redirection is to write a matrix to a file, using the putmat command. This file can be read by redirecting the input file. This is done in the same way as above, but using ``<'' instead of ``>''. For example,
% type j ; a2+b2+c2 % putmat j >j.mat % mat k j.mat ; same as "mat k <j.mat" except no prompting is done % type k ; a2+b2+c2
It is also possible to use redirection of the input file to run ``script'' files. These are files which contain commands for Macaulay to execute. Such script files may have parameters, and some facilities exist for rudimentary programming. For more information on this, see.
: