|
From: Ethan A M. <merritt@u.washington.edu> - 2008-02-17 07:13:38
|
On Friday 15 February 2008 15:54, Scott Worley wrote:
> Why are data files required to be regular files or pipes?
I don't know.
> There's a S_ISREG or S_ISFIFO check performed in src/datafile.c around
> line 1303.
>
> I often use bash's <() process substitution syntax to generate data to
> plot.
I do not quite follow what you mean. Could you please provide an example
set of commands? The thing that confuses me is that if you type a
command like
plot '< (grep toe ~/aardvarks)' using lines
it should work without passing through the code at line 1303,
because the '<' is trapped as a special case and treated separately
(line 1276).
To prove the point, here is the output from a stupid test run:
gnuplot> plot '/dev/null'
^
"/dev/null" is not a regular file or pipe
util.c: Success
gnuplot> plot '< (cat /dev/null)'
^
warning: Skipping data file with no valid points
^
x range is invalid
> This works great in GNU/Linux, and worked in FreeBSD, OpenBSD,
> and NetBSD with bash versions less than 3.2. Starting with bash 3.2.0,
> bash uses /dev/fd/63 and similar for these substitutions. In Linux,
> these "devices" are pipes -- they are S_ISFIFO. In *BSD, they are
> character devices -- S_ISCHR.
>
> What is the S_ISREG or S_ISFIFO test for, anyway? It's been in gnuplot
> since the sourceforge cvs import (rev 1.1, 1999), so there's no commit
> log there to explain the reason for adding it. Also, the test is simply
> skipped ifndef HAVE_SYS_STAT_H.
>
>
> Removing the test from gnuplot allowed my graphing scripts to work in
> *BSD again.
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> gnuplot-beta mailing list
> gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
>
--
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle 98195-7742
|