#\- extract [fmt=%n.m{e|f}] [fmt1=%n.m{e|f}] # [list={#_#..|str_str..}] [skip=n] # # extract a list of values from the results file produced by run of react; # # NOTE: extract is a filter: stdout # # fmt, fmt1, list, and skip are awk parameters; # # fmt, fmt1: # the format can be selected by setting fmt for the species concentration and # fmt1 for the time (the first value ouput); # the format of the format string is that of printf's "e" or "f" format; # # list: # the time is always printed; the species for which concentrations are # printed can be selected by setting list to an underscore-separated list # of species identifiers, either numeric or string; # # the defaults are to print all species, %12.5e; # # skip: # obvious; # # # example: # 1 && count > 0 && (count % skip)) next printf fmt1, $1 for (i = 1; i < NF; i++) { if (list == "") printf fmt, $(i+1) else if (number_type && i in list_elements) printf fmt, $(i+1) else if (species[i] in list_elements) printf fmt, $(i+1) } printf "\n" }'