reversing site coordinates

Cosyn Bart Bart.Cosyn at rug.ac.be
Sat Mar 16 07:00:00 EST 1996


On Fri, 15 Mar 1996, Christine Weiss wrote:

> Hi,
> 
> Does anyone have an awk program to reverse the coordinates of a site file:
> 
> y|x|attribute   to   x|y|attribute
> 
This should work

 awk -F'|' '{print $2"|"$1"|"$3}' test

where test is your input file
after checking if it works redirect it to a file
by adding > outputfile

 awk -F'|' '{print $2"|"$1"|"$3}' test > outputfile

                Bart


        ---------------------------------------------------     
        | ir. Bart Cosyn                                  |
        | VLIR-project Tunisia                            |
        | Laboratory for Hydrology and Water Management   |
        | University of Gent                              |
        | Coupure 653, B-9000 Gent                        |     
     | Belgium                                    |
        | Tel: +/32/9/2646137                             |
        | Fax: +/32/9/2646236                             |     
        | E-mail: Bart.Cosyn at rug.ac.be                    |
        | URL: http://taoren.rug.ac.be/                   |
        ---------------------------------------------------






More information about the grass-user mailing list