Contents of the GFR.DOC file
GFR :: GMUtant Find and Replace version 1.00
Description: GFR is a simple utility designed for one purpose...to save
typing during coding of source for pascal, c, clipper, dbase or any other
language that uses ASCII files as source code. With GFR, you can use short
names for variables during the coding process. When you're done,
use GFR to expand terms into more meaningful variable names. The result
is somewhat better self-documentation for your code and some time
saved during coding.
You can also standardize your case using GFR. For example, if in some
parts of your code you use a variable named Filename and in another
part you use your real preference, FileName, you can run GFR in automatic
mode and ask to ignore case, replacing all filename with FileName...this
will catch Filename, FILENAME or even FiLeNaMe.
Registration? None required. If you use GFR send a post card, letter or
call our BBS, letting us know you're using the program--given the intricate
web of BBS's around the world, it's always interesting to see where one's
efforts end up.
Author: Clyde W. Grotophorst, Systems Office, Fenwick Library
George Mason University, 4400 University Dr., Fairfax, VA 22030
GMUtant OnLine BBS: (703) 993-2219 Compuserve: 70404,3376
Input: Any ASCII file(s). Input files must be in the
current directory. This restriction was done to
minimize the chance of accidentally running
GFR on files you didn't really intend to process.
You may call GFR from any directory as long as the
GFR.EXE file is in a subdirectory on your Path.
Output: If a change is made, your original file is saved with
a GFR extension. The new file (with changes made)
carries the original file name.
Process: GFR will make global changes to text strings in the file as
Options: ignore case, automatic processing.
Use GFR with caution. It is a powerful utility and we've tried to make it
safe but you never want to use global find & replace commands without
a bit of thought.
A Usage Example
For example, suppose you're coding a multi-file pascal program. If you
follow a naming convention for each unit (e.g., MYPROG.PAS which uses
MYSCR.PAS and MYFILES.PAS and MYUTILS.PAS for units). Then when you're
coding the application you can use short variable names during the
coding process. To illustrate, suppose you constantly have this
sequence of code in your program.
It will be faster to code it originally as:
Then when you're finished, use GFR to expand the 'inf' and 'infn' to
InputFile and InputFileName...
C:\TP>GFR MY*.PAS [return]
GFR 1.0 (c) 1992, GMUtant Software Global Find/Replace Utility
Enter original string -> inf
Enter replacement string -> InputFile
Ignore case (y/n)? Y
Automatic Processing (y/n)? Y
Ignore case means if the characters in your original string match the
input file, a change will be made regardless of the case of the
Automatic processing means GFR will make the changes without pausing
for your approval.
If a change is made, the original file will have a GFR extension. During
development we originally had GFR give the new file a GFR extension and
saved the original file with it's original name. After using the
program for a while, we realized that it worked better the other
way around--since you can do interative runs of the program to
make a multitude of changes...renaming the GFR extensions back to the
original file extension.
Note on case sensitivity
If you turn off case sensitivity, it is possible that the report on
matches/changes will not match your perception of what should be
happening. Specifically, if you replace original text with the
same new text (changing only the capitalization), then each match
(regardless of case) will be counted...sometimes the text in your
old and new string will be identical but GFR will still count it as
a 'match.' Also realize that if you turn off automatic processing
while case sensitivity is off, you will only be shown lines that are
actually different once 'changed.' This can cause a situation where
you ask to review all changes, GFR shows you nothing, and yet finishes
by reporting that 100 changes were made. In this instance, you can
ignore the change report--GFR has made changes that replaced existing
text with identical new text...
During operation, GFR creates temp files for each file being processed.
The temp files are given a ~G~ extension. When GFR first cranks up,
it seeks out and deletes any ~G~ files that may exist. Then as it is
processing, the new file is written to a temp file with the same name
as the original but a ~G~ extension. When all matching files have
been processed, the ~G~ extension files are given the original's
extension and the original file is renamed with a GFR extension.
GFR is one of several GMUtant Utility programs
GFD - delete files across all logical drives for a specified filespec
GFF - find files across all logical drives
GTU - 20+ utilities in one (sort, case conversion, word count, etc.)
Other GMUtant Software Products:
BIBL - Personal Library/Bibliography Management System. [SHAREWARE]
This is our 'flagship' product. It's available on our BBS
or from CompuServe's IBM Apps forum (General appications).
CD2BIBL - Convert CD-ROM downloads for use with BIBL
ZKWIK - KWIC/KWOC indexing package
Revision history: 1.00 February 26, 1992. initial release.