|
From: Hans-Bernhard B. <HBB...@t-...> - 2009-09-11 18:04:37
|
baalkikhaal wrote:
> i want to perform a summation of column 2 of each of given set of data files
> and then plot the sum against the common column 1
It may be possible to do such things inside gnuplot these days (using
the CVS version, or 4.4 once that becomes a reality), but I think you
should do this outside. Command-line tools like 'paste', 'join' and
'awk' should work just fine here. Basically:
while there are more than 1 files left:
paste lastfile nexttolastfile | \
awk '{print $1, "\t", $2+$4}' > new_lastfile
mv new_lastfile nexttolastfile
With a more complex script, awk could do the entire job.
|