substpat (should have been called "subst" for simplicity but that's already
used by the shell :-( ) can substitute a string for any occurence of a
pattern in a character stream. It reads from stdin and writes to stdout so
it can be used in pipes.
A typical invocation: substpat ^[Aa]ssign ";assign" <s:startup-sequence
This would comment out all lines starting with "assign" in your
startup-sequence and write the resulting file to stdout.
Substituting multiple patterns with different strings requires a pipe:
substpat ^[Aa]ssign ";assign" <s:startup-sequence | substpat "REMOVE ?" ""
(comment out assigns and kill all "REMOVE" keywords)
|