Does gnuplot allow bash process substitution?
In gnuplot I can do:
plot "<join tmp1 tmp2" u 2:3
But I can't get this to work:
plot "<join tmp1 <(join tmp2 tmp3)" u 2:3
Should it work, or isn't bash process substitution supported in gnuplot?
Here are 3 example input files:
cat tmp1
A 1
B 2
C 3
cat tmp2
B 3
C
D 6
cat tmp3
A 4
B 6
C 8
D 10
E 12
The command following the < is executed with popen(), which uses /bin/sh (see man popen). So you must invoke bash explicitely in order to make use of the process substitution:
plot '< exec bash -c "join tmp1 <(join tmp2 tmp3)"' using 2:3
In your case with the single substitution the following would also do:
plot '< join tmp2 tmp3 | join tmp1 -' using 2:3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With