4.3BSD/usr/contrib/icon/man/cat1/edscript.1




EDSCRIPT(1)           Icon Program Library            EDSCRIPT(1)



NNNNAAAAMMMMEEEE
     edscript - generate script for ed(1)

SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
     eeeeddddssssccccrrrriiiipppptttt

DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
     _E_d_s_c_r_i_p_t takes specifications for global edits from standard
     input and outputs an edit script for _e_d(_1) to standard out-
     put.  _E_d_s_c_r_i_p_t is primarily useful for making complicated
     literal substitutions that involve characters that have syn-
     tactic meaning to _e_d(_1) and hence are difficult to enter in
     _e_d(_1).

     Each specification begins with a delimiter, followed by a
     target string, followed by the delimiter, followed by the
     replacement string, followed by the delimiter.  For example

          |...|**|
          |****||

     specifies the replacement of all occurrences of three con-
     secutive periods by two asterisks, followed by the deletion
     of all occurrences of four consecutive asterisks.  Any char-
     acter may be used for the delimiter, but the same character
     must be used in all three positions in any specification,
     and the delimiter character cannot be used in the target or
     replacement strings.

DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
     Any line that does not have proper delimiter structure is
     noted and does not contribute to the edit script.

SSSSEEEEEEEE AAAALLLLSSSSOOOO
     ed(1)

AAAAUUUUTTTTHHHHOOOORRRR
     Ralph E. Griswold

















Version 5.9    The University of Arizona - 3/27/83              1