I am trying to use paste in combination with awk inside gnuplot so that I can take certain columns of two different files and plot the result. However, I am getting this error:
sh: 1: Syntax error: "(" unexpected
I understand that it's unhappy with that part of my gnuplot script:
system("paste <(awk '{print $1,$2,$3,$4,$5,$14}' ".filename(i).") <(awk '{print $14}' ".filename_without.") > Tim_res_".i)
And more specifically the brackets before awk. Replacing the filenames without using a variable name doesn't work either while all the command works perfectly fine outside of gnuplot. If I remove the brackets, then it says it doesn't recognise awk, and the command doesn't work outside of gnuplot either.
I've read that adding #!/usr/bin/bash might help, but it actually doesn't solve the problem nor does it give another error message. I've never had this kind of problem using such commands within gnuplot before.
I have a lot of files to plot in a similar way, hence why I'd like to make it automatic directly in gnuplot, the system command being only here to make sure it works before I can replace it directly after the plot command of gnuplot.
Thanks for any help
< (with a space in between the two characters is a syntax error in the shell, too. - Tom Fenech