Credits | Overview | Plotting Styles | Commands | Terminals
--- | --- | --- | --- | ---

## print

The set print command redirects the output of the print command.

Syntax:

          set print
          set print "-"
          set print "<filename>" [append]
          set print "|<shell_command>"
          set print $datablock [append]

set print with no parameters restores output to <STDERR>. The <filename> "-" means <STDOUT>. The append flag causes the file to be opened in append mode. A <filename> starting with "|" is opened as a pipe to the <shell_command> on platforms that support piping.

The destination for print commands can also be a named data block. Data block names start with '$', see also inline data. When printing a string to a data block, embedded newline characters are expanded to generate multiple data block entries.