Importing an undelimited text file to GRASS
Ben Horner-Johnson
ben at earth.nwu.edu
Fri Feb 19 15:06:37 EST 1999
You could use the "cut" command (Unix) to separate the file into separate files
based on the character positions. It's kind of a kluge to do it this way, but
if your file has 5 character columns (how many?), you can break it into
separate files by using
"cut -c1-5 file > file.1"
"cut -c6-10 file > file.2"
etc.
If you still want to do gawk processing, use "paste" to put the
files back together - paste adds a tab character between columns.
I've heard the perl can be used for this type of work.
The other option is to attempt to compile your f90 program with an f77
compiler and hope there aren't too many incompatibilies. (Or write
and f77 version if you have that compiler, this sort of I/O is
trivial FORTRAN programming.)
Hope this helps...
Ben Horner-Johnson
ben at earth.nwu.edu
More information about the grass-user
mailing list