[GRASS-user] convert r.report output to spreadsheet format

Giovanni Pasini jynxtor at gmail.com
Tue Feb 24 11:12:11 EST 2009


maning sambale ha scritto:
> Hi,
> 
> Looking for tips in "transforming" r.report output into a
> "spreadsheet" like format.
> 

Hi,
I use awk (change NF and the other fields $*):

r.report -n map=gri_1000_in,dem2_idw_100_slope_rec units=h,p,c | awk 
'BEGIN {FS="|";OFS="|"} !/---/ && NF==7 {intest=$2} NF==8 {sub(/[ 
.]*$/,"",$4); print intest, $4, $6}' > report_slope.txt

This from a non awk expert!

cheers,
giovanni


More information about the grass-user mailing list