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

util/cli/rep.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Replace strings in files (CLI-Pure)
Author:dck at prometheus.hol.gr (D. Keletsekis)
Uploader:dck prometheus hol gr (D Keletsekis)
Type:util/cli
Version:1.3
Requires:WB 2+
Architecture:m68k-amigaos
Date:1997-11-11
Download:http://aminet.net/util/cli/rep.lha - View contents
Readme:http://aminet.net/util/cli/rep.readme
Downloads:635

REP is a small, fast CLI command for replacing strings in files.
It is pure and can be made resident.

This version adds the ability to define HEX and non-printable
characters in the string (read on..)

  Usage :   
-------------
> Rep FromFile/A, String/A, ToString/A, ToFile, I=Insensitive/S

  Where :
-------------
FromFile    - is the file you want to convert.
String      - The string you want to replace
ToString    - What you want to replace it with 
ToFile      - (Optional) the name of the output file. If this is 
              not given, then the INPUT FILE WILL BE OVERWRITEN!
Insensitive - (Optional) Make the search case-insensitive

  Example :
--------------
rep df0:MyFile ThisString ThatString Insensitive
- will replace all occurences of "ThisString" (or THISstring, or 
  ThIsStRiNg etc) with "ThatString" and save it over the original
  file.

"String" and "ToString" are parsed and may contain HEX, DECIMAL 
and other non-printable characters. The way to do this is:

The "\" character starts a character specification :

   \n     - is the Newline character (decimal 10)
   \r     - is the carriage return
   \t     - is the TAB character
   \\     - is the \ character itself
   \"     - is the " character
   \'     - is the ' character

   \x     - starts a HEX character string, defined by pairs
            of HEX digits (0-9,A-F) until another \ character
            or the end of the string are encountered. 
            ex: MyString\x000003F3\continues

   \#     - starts a DECIMAL character, defined by a number 
            from 0-255. Again, the number ends with another
            \ character or the end of the string.
            ex: "\#155\32mWhite text"

   Any other character will be considered literally, i.e.
   \c     - is the "c" character.

There is also a GUI script included, which makes this litle
command very powerful & easy to use if you want to make the
same replacements in a lot of files. A preview is included.

The GUI needs a program called Gui4Cli (also written by yours
truly and what a great program it is too :), available at :

1.-   http://users.hol.gr/~dck/gcmain.htm
2.-   Aminet, under Dev/Gui/Gui4Cli.lha

D. Keletsekis - dck at prometheus.hol.gr
Novemeber 1997

This program is FreeWare, but remains the Copyright of D.Keletsekis.
No guarantees as to it's performance and actions is made or implied.
Use it at your own risk. 


Contents of util/cli/rep.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                  267     628  42.5% -lh5- 332e Oct  3  1997 REP.info
[generic]                 1105    1472  75.1% -lh5- 20b0 Oct  3  1997 REP/Rep
[generic]                 2009    6056  33.2% -lh5- bdfe Oct  3  1997 REP/Rep.gc
[generic]                  192     590  32.5% -lh5- f926 Oct  3  1997 REP/Rep.gc.info
[generic]                 1262    2594  48.7% -lh5- 85da Oct  3  1997 REP/Rep.readme
[generic]                 3877   14870  26.1% -lh5- a437 Oct  3  1997 REP/RepGrab.iff
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         6 files    8712   26210  33.2%            Nov 11  1997

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>