From: LukasP <LP...@po...> - 2009-12-20 08:42:40
|
Hello all, I have the same problem - how to access parameters passed on the system command line. I am a Windows user, so solutions described above are unreachable for me. Let's have system command: wgnuplot.exe tab2png.gp test.tab Inside the tab2png.gp, I need to access test.tab passed on the command line. How to do it? Do you think it would be possible or useful to implement built-in variables (e.g. ARG1, ... ARG9) which would represent the command line arguments for [w]gnuplot? Or to create a built-in function e.g. getenv(varname) which would get the environment variable? So it would be possible to write to the command line: C:\> wgnuplot.exe tab2png.gp test.tab or: C:\> set FILE=test.tab C:\> wgnuplot.exe tab2png.gp And the tab2png would look e.g.: plot $ARGV1 using 1:2 with lines or: set FILE getenv("FILE") plot FILE using 1:2 with lines Thank you in advance Lukas -- View this message in context: http://old.nabble.com/command-line-arguments-to-gnuplot-scripts-tp7757834p26861786.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |