manpagez: man pages & more
info gnuplot
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.25 shell

The shell command spawns an interactive shell. To return to ‘gnuplot‘, type ‘logout‘ if using VMS, exit or the END-OF-FILE character if using Unix, ‘endcli‘ if using AmigaOS, or exit if using MS-DOS or OS/2.

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"

This document was generated on November 19, 2011 using texi2html 5.0.

© 2000-2017
Individual documents may contain additional copyright information.