gnuplot redirect data to a here-doc

Multi tool use
Multi tool use


gnuplot redirect data to a here-doc



This command works properly to write the results to the file "oneMonthDataOnlyfile.txt"


system("/usr/bin/sed -e '1,3d' " . "oneMonthData.txt" ." > oneMonthDataOnly.txt" );



Can I do the redirect to a here-doc, e.g.:


system("/usr/bin/sed -e '1,3d' " . "oneMonthData.txt" . "> $myData);



When I try with the above formatting I get "parenthesis expected"



or withsystem("/usr/bin/sed -e '1,3d' " . "oneMonthData.txt" ." > $myData " );
sh: $myData: ambiguous redirect
ambiguous redirect


system("/usr/bin/sed -e '1,3d' " . "oneMonthData.txt" ." > $myData " );



or: system("/usr/bin/sed -e '1,3d' " . "oneMonthData.txt" > $myData);
throws: "Column number or datablock line expected


system("/usr/bin/sed -e '1,3d' " . "oneMonthData.txt" > $myData);



Am I getting the formatting wrong or can a here-doc not be populated this way?




1 Answer
1



Try this:


set print $myData
print system("whatever command you like")
unset print






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

LwSX elE 7NLD0mnLClr,QDbqpRDV2T65tVLyjT3rDVUtkCg6YZ6 fdhZGnaTtsptAsRgBgs2hVz1g
hG7q0C4,NWr5g62jtgoQA,tr25LdlSPlfoWCO txmmLKW4hA1wx,fSa,M VNz,M0PH CnvMMQ,cqOV7gC4jCrkOsy ghwnSR4

Popular posts from this blog

PHP contact form sending but not receiving emails

Do graphics cards have individual ID by which single devices can be distinguished?

Create weekly swift ios local notifications