home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
ss.zip
/
ss.doc
next >
Wrap
Text File
|
1996-11-05
|
4KB
|
83 lines
SuperSearch Version 1.0 - Search and Replace text inside textfiles.
-------------------------------------------------------------------
1994-10-14. Author: E.S. Dunckley, RAU
Recompiled using the beta Speed os2 compiler.
BACKGROUND
----------
This is a utility written in Pascal to search and replace for strings of text
inside text files. The reason I've written this program is to move programs from
one drive to another and then run this utility to correct drive-letter errors in
all the config- and batch files. YOU can use it for whatever reason you like.
You MIGHT like to use this to correct frequent typing errors in text files.
USE WITH UTMOST CARE: This program does NOT ask any "Are you sure" questions!
SYNTAX
------
(Thy 11th commandment: Thou should make backups! Especially before playing!)
SS.EXE filespec searchstring [replacestring] [/c]
filespec - any valid filespec eg. *.ini, *.bat, *.txt.
searchstring - A valid text string without spaces.
replacestring - (optional.) A valid replace string without spaces.
/c - (optional.) Do a case sensitive search.
/v - (optional.) gives out a bit more info.
FEATURES
--------
a) Small and easy and powerfull - yeah right! The dos exe was 6kb!
b) Prints out changes made to standard output
c) Easy to use
d) A real timesaver if you move Windows from one drive to another!
e) Small on diskspace
f) Sourcecode can be easily transported to any Operating system.
g)
BUGS, IRRITATIONS and WARNINGS
------------------------------
a) Does NOT handle binary files - will corrupt a binary file if used on one!
b) Does NOT handle filepermissions/attributes. Make sure all files in filespec
are in fact Writable.
c) Does very little errorchecking.
d) Leaves a $$SS.tmp file after completion. Not serious but IRRITATING.
e) Very little commandline parameters - IRRITATING
HINTS&TIPS
----------
Try something like SS *.ini C:\WINDOWS | MORE to have info a page at a time, or
SS *.BAT \DOS > test.txt to pipe the resulting information to a file or even
SS AUTOEXEC.* superpck to us SS as a unixlike GREP function!
POSSIBILITIES FOR THE FUTURE
----------------------------
The first person sending me a single dollar, rand, deutchmark, yen will motivate
me to do some of the following:
0) Get someone who actually knows anything about programming to make it better.
a) Get SS to do subdirectories.
b) Have SS take is't input from a filelist eg SS @filelist search replace /c
c) Let SS do binary files as well as text files. (bit dangerous.)
d) SS feeding it's input from a pipe eg DIR | SS dos
e) SS to backup files before fiddling with them
f) Let SS query you which lines to replace
g) Have SS handling multiple filespecs eg SS *.ini *.grp *.bat c:\win c:\windows
h) Have PLENTY of usefull parameters like /r for rename, /h for hidden etc...
i) Have SS to handle complex strings like SS *.ini "<CR><LF>" "<CR>"
j) Maybe a builtin more-command?
k) Maybe turn SS into a full pre-emptive multitasking 64Bit Operating System?
l) Since I am a KEEN OS/2er, have SS run as a PM application?
CONTACTING THE AUTHOR and DISCLAIMER
------------------------------------
I can be contacted at eddie@eng.rau.ac.za for suggestions. I am NOT responsible
for the feeble actions of my program. YOU are the one messing up your files
using my program, not me! You want WHAT? To REGISTER!!??? So that I can be
blamed?? Send me $1 and a postcard as a token of appreciation if I saved you
some time with this utility or if you use it more than once in a lifetime.
Eddie Dunckley, Flora Villas no 41, Hull Street, Florida, South Africa, 1709
Telno: (+27 countrycode?) 011 472-2703 (home) (a.h. (GMT+2!!) 011 489-2634(w)