Syntax:
set output {"<filename>"} show output
The filename must be enclosed in quotes. If the filename is omitted, any output file opened by a previous invocation of set output will be closed and new output will be sent to STDOUT. (If you give the command set output "STDOUT", your output may be sent to a file named "STDOUT"! ["May be", not "will be", because some terminals, like x11 or wxt, ignore set output.])
MSDOS users should note that the 3#3 character has special significance in double-quoted strings, so single-quotes should be used for filenames in different directories.
When both set terminal and set output are used together, it is safest to give set terminal first, because some terminals set a flag which is needed in some operating systems. This would be the case, for example, if the operating system needs to know whether or not a file is to be formatted in order to open it properly.
On machines with popen functions (Unix), output can be piped through a shell command if the first non-whitespace character of the filename is '4#4'. For instance,
set output "|lpr -Plaser filename" set output "|lp -dlaser filename"
On MSDOS machines, set output "PRN" will direct the output to the default printer. On VMS, output can be sent directly to any spooled device. It is also possible to send the output to DECnet transparent tasks, which allows some flexibility.