AminetAminet
Search:
84782 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/cli/substpat.lha

Mirror:Random
Showing: i386-aros icongeneric icon
No screenshot available
Short:Regexp-based string substitution tool. Source in C included.
Author: Matthias.Bethke at stud.uni-erlangen.de
Uploader:Matthias Bethke stud uni-erlangen de
Type:util/cli
Version:37.1
Architecture:m68k-amigaos
Date:1998-02-27
Requires:regexp.library V38 (util/libs/regexp.lha)
Download:util/cli/substpat.lha - View contents
Readme:util/cli/substpat.readme
Downloads:468

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)


Contents of util/cli/substpat.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                  482     881  54.7% -lh5- 0712 Feb 26  1998 substpat.readme
[generic]                 1914    2816  68.0% -lh5- d754 Feb 26  1998 substpat/substpat
[generic]                 1789    4009  44.6% -lh5- e85c Feb 26  1998 substpat/substpat.c
[generic]                  150     250  60.0% -lh5- 5d1b Feb 26  1998 substpat/SCOPTIONS
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         4 files    4335    7956  54.5%            Feb 27  1998
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>