There are two ways of spawning a shell command: using system command or via ! ($ if using VMS). The former command takes a string as a parameter and thus it can be used anywhere among other gnuplot commands, while the latter syntax requires to be the only command on the line. Control will return immediately to gnuplot after this command is executed. For example, in AmigaOS, MS-DOS or OS/2,
! dir
system "dir"
prints a directory listing and then returns to gnuplot.
Other examples of the former syntax:
system "date"; set time; plot "a.dat" print=1; if (print) replot; set out; system "lpr x.ps"
On an Atari, the ! command first checks whether a shell is already loaded
and uses it, if available. This is practical if gnuplot is run from
gulam, for example.