Differences between revisions 2 and 3
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
SED is a UNIX text tool. From this [http://unxutils.sourceforge.net/ GNU Utilities site], download Unxutils.zip and unzip sed.exe from the '''.'''zip file. SED is a UNIX text tool. From this [http://unxutils.sourceforge.net/ GNU Utilities site], download Unxutils.zip and unzip sed.exe from it.
Line 5: Line 5:
Example for shortening a '''.'''dat file downloaded from the NGS: Example of using SED with a script file called dsheet.sed to shorten a '''.'''dat file called jefferson.dat downloaded from the NGS:

SED is a UNIX text tool. From this [http://unxutils.sourceforge.net/ GNU Utilities site], download Unxutils.zip and unzip sed.exe from it.

SED uses a script file and works in DOS mode.

Example of using SED with a script file called dsheet.sed to shorten a .dat file called jefferson.dat downloaded from the NGS:

  • sed -f dsheet.sed jefferson.dat > jefferson.txt

will use a script file called dsheet.sed to change the file jefferson.dat to a shortened version called jefferson.txt

Here is the contents of the script file dsheet.sed made to work on ["NGS"] ["datasheet"]s and this version of the SED program:

/^1/d
/^DATABASE/d
/^  /d
/^ ....../s///
/^\./d
/^$/d
/^\;/d
/^\!/d
/^\:/d
/^|/s// |/
/^./s///
/^ _MARKER/s/_/ /
/^ _SETTING/s/_/ /
/^ _STAMPING/s/_/ /
/^ GEOID/d
/^ DYNAMIC/d
/^ MODELED/d
/^ VERT ORDER/d
/^ NGVD 29/d
/^ _/d
/^STABILITY/d
/^SATELLITE/d
/CURRENT SURVEY CONTROL/d
/SUPERSEDED SURVEY CONTROL/d
/MONUMENTED/s/HISTORY/XISTORY/
/^ HISTORY/d
/XISTORY/s//HISTORY/
/ HISTORY     - /s//MONUMENTATION: /
/    MONUMENTED      /s//by/
/^SP_SET/s//SPECIFIC SETTING/
/NATIONAL GRID SPATIAL ADDRESS/d
/COMP$/d
/LAPLACE CORR/d
/ELLIP HEIGHT/d
/HORZ ORDER/d
/ELLP ORDER/d
/GP(/d
/AD(/d
/^$/d
/^ X   /d
/^ Y   /d
/^ Z   /d

Copy the contents of this box into a text file called dsheet.sed

SED (last edited 2009-03-21 21:03:19 by localhost)