m.dem.extract from disks, new info
Michael Shapiro
shapiro at zorro.cecer.army.mil
Mon Aug 24 15:06:47 EDT 1992
The m.dem.extract program on moon.cecer.army.mil which attempt to
read DEM data from disk files as well as tapes requires that the
disk file NOT have any special characters added to the file. In
particular, utilities that copy tape to disk often add carriage
returns or line feeds (or both). If your utility does add these
characters, here is a one line shell script that will remove
them:
fold $* | sed 's/^M/g' | awk '{printf("%s",$0)}'
Please note the the ^M is supposed to be a single character
(carriage return). It appear here as 2 characters (and here it
is in fact 2 characters). You will have to edit the ^M and put a
real control-M in their place. In vi this can be done by deleted
the ^M and inserting a true RETURN by typing in control-V
control-M.
We will fix m.dem.extract to ignore linefeeds and carriage
returns so this won't be necessary in the future. But the script
is useful for later programs that attempt to deal with disk
images of tapes that do not account for these inserted
carriage returns and linefeeds.
Michael
More information about the grass-user
mailing list