|
From: theozh <th...@gm...> - 2017-07-27 14:38:53
|
well, I don't know awk or cygwin... but a little Perl...
Maybe someone can tell me whether awk, cygwin, ... is smaller, simpler,
faster to install and run... than Perl?
So, the following below seems to be a solution, although, I prefer not
to install Perl or anything else on every machine before I can run the
gnuplot code...
If someone still has a "gnuplot-only" version, please let me know.
During my search, I found a discussion from >10 years ago whether
gnuplot should have a function to check the existance of a file. But it
seems it was rejected.
Why can't gnuplot just give back an empty string instead of terminating?
Perl-Script FileList.pl:
### Perl Script to print a directory list
print qx{"dir /B /S $ARGV[0]"};
### end Perl-Script
### gnuplot code
reset
set multiplot layout 3,3
do for [i = 1:9] {
FileList = system("perl FileList.pl Data".i."*.dat")
if (FileList ne "") {
plot for [FileName in FileList] FileName u 1:2 w l
}
else { set multiplot next}
}
unset multiplot
### end gnuplot code
|