From 78346d1961bcd03927715421d1a7440a0b3ad7ae Mon Sep 17 00:00:00 2001 From: Silvano Chiaradonna Date: Mon, 6 Nov 2023 16:54:48 +0100 Subject: [PATCH] new scripts for selecting experiments --- Fig_src/gnuplot/bin/dataexp.awk | 12 ++++++++++++ Fig_src/gnuplot/bin/dataexpYtl.awk | 23 +++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100755 Fig_src/gnuplot/bin/dataexp.awk create mode 100755 Fig_src/gnuplot/bin/dataexpYtl.awk diff --git a/Fig_src/gnuplot/bin/dataexp.awk b/Fig_src/gnuplot/bin/dataexp.awk new file mode 100755 index 0000000..10f25b1 --- /dev/null +++ b/Fig_src/gnuplot/bin/dataexp.awk @@ -0,0 +1,12 @@ +#!/opt/sw/bin/awk -F, --exec + +BEGIN{ + expnum=ARGV[1] + measure=ARGV[2] + ARGV[1]=ARGV[3] + ARGC=2 +} + +$1==sprintf("Experiment %s", expnum) && /Mean/ && $3==measure { + printf"%s %s %s %s\n",$3,$4,$6,$8 # Name,Start Time,Mean,Confidence Interval +} diff --git a/Fig_src/gnuplot/bin/dataexpYtl.awk b/Fig_src/gnuplot/bin/dataexpYtl.awk new file mode 100755 index 0000000..5758127 --- /dev/null +++ b/Fig_src/gnuplot/bin/dataexpYtl.awk @@ -0,0 +1,23 @@ +#!/opt/sw/bin/awk -F, --exec + +BEGIN{ + expnum=ARGV[1] + measure=ARGV[2] + ARGV[1]=ARGV[3] + ARGC=2 +# ARGC The number of elements in the ARGV array. +# ARGV An array of command line arguments, excluding options and the program argument, +# numbered from zero to ARGC−1. +# The arguments in ARGV can be modified or added to; ARGC can be altered. As each input file ends, +# awk shall treat the next non-null element of ARGV, up to the current value of ARGC−1, inclusive, +# as the name of the next input file. Thus, setting an element of ARGV to null means that it shall +# not be treated as an input file. The name '−' indicates the standard input. If an argument matches +# the format of an assignment operand, this argument shall be treated as an assignment rather than +# a file argument. +# [ https://stackoverflow.com/questions/61760801/awk-script-command-line-arguments-and-file-input ] +} + +$1==sprintf("Experiment %s", expnum) && /Mean/ && $3==measure { + printf"%s %s %s %s %s\n",$3,$4,$5,$6,$8 # Name,Start Time,End Time,Mean,Confidence Interval + +}