NAME

command-to-file - Write the command prints and result to file

SYNOPSIS

command-to-file command file [mode]

DESCRIPTION

This evaluates a command in the current interpreter. The prints issued by the command and its result (both of which are normally printed to stdout) are redirected to the given file. The mode determines whether the file is initially opened in write (-new) or append (-existing) mode. If no mode is given, then -new is assumed.

EXAMPLES

The command writes all productions to the file my-file:

command-to-file list-productions my-file

This command appends the memory statistics to the already existing file my-stats-file:

command-to-file {stats -memory} my-stats-file -existing

SEE ALSO

output-strings-destination