Credits | Overview | Plotting Styles | Commands | Terminals |
---|
Command-line substitution is specified by a system command enclosed in backquotes. This command is spawned and the output it produces replaces the backquoted text on the command line. Exit status of the system command is returned in variables GPVAL_SYSTEM_ERRNO and GPVAL_SYSTEM_ERRMSG.
Note: Internal carriage-return ('\r') and newline ('\n') characters are not stripped from the substituted string.
Command-line substitution can be used anywhere on the gnuplot command line except inside strings delimited by single quotes.
For example, these will generate labels with the current time and userid:
set label "generated on `date +%Y-%m-%d` by `whoami`" at 1,1 set timestamp "generated on %Y-%m-%d by `whoami`"
This creates an array containing the names of files in the current directory:
FILES = split( "`ls -1`" )