simple (g)awk code

Agustin Lobo alobo at
Wed Jul 21 09:08:26 EDT 1999

Is there anybody "fluent" in awk (or gawk)
who could help me with a simple script?

I just need to read the output of 3
files produced by r.stat, so like:

1 val1a val2a val3a
2 val1a val2a val3a
3 val1a val2a val3a

("a" indicates that the values are the ones 
from the first file)

and then make one single file in the form:

1 val1a val2a val1b val2b val1c val2c val3
2 val1a val2a val1b val2b val1c val2c val3
3 val1a vala2 val1b valb2 val1c val2c val3

I know that I could make such a file by inputing all maps
at once to r.stats, but these maps can be huge auxiliary
maps within a script,  so I prefer to just keep the
stats and rewrite the auxiliary map.



Dr. Agustin Lobo
Instituto de Ciencias de la Tierra (CSIC)
Lluis Sole Sabaris s/n
08028 Barcelona SPAIN
tel 34 93409 5410
fax 34 93411 0012
alobo at

More information about the grass-user mailing list