home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
316.lha
/
LookFor_v1.0
/
LookFor.doc
< prev
next >
Wrap
Text File
|
1989-12-04
|
5KB
|
107 lines
LookFor Version 1.0
Copyright 1989 by Ray Lambert
Created by Ray Lambert
LookFor is a grep-like utility which is used to locate strings of bytes in
either text or binary files. When a match is found the absolute binary file
offset to the string is reported. In text mode, a segment of the line which
contains the matched string is displayed along with its approximate line
number. While grep may be more powerful in some ways, LookFor shines in its
own way. LookFor was written originally for use with binary files. It has
been enhanced since then to support text files as well. It has a simpler
interface than grep which is one reason you may like it. Wildcard
expressions are not required on search strings nor are they used. All
search strings are treated as thought they have a "*" wildcard (match all)
on each end. For example, LookFor will find the imbedded "int" in "printf".
LookFor works from the CLI only. The first argument must be a search
string. The search string can be either ASCII or HEX. An ASCII search
string does not need to be enclosed in quotes unless it contains space
character(s). A HEX search string must be prefixed with the dollar sign
character "$", which must in turn be followed by a series of two-digit
hexadecimal numbers. (The total number of digits must be divisible by two).
No spaces are allowed between the digits. (Incidentally, if an ASCII search
string begins with the dollar sign character it must be enclosed in quotes
to keep it from being interpreted as a HEX search string). All arguments
which follow must be either a file specification or a switch (option
selector).
Each file specification may include either MS-DOS style or AmigaDOS style
wildcard characters, and you may specify as many file specs as you wish.
Each file spec must be seperated by a space and if any file spec contains a
space it must be enclosed in quotes.
Switches may be intermixed between file specs. The switches specified to
the left of a file spec influence the search on all files which match it.
All switches have two forms: 1) prefixed by a minus sign "-" turns the
option "off" and 2) prefixed by a plus sign "+" turns the option "on".
Following the prefix is a single letter which names the option. The letter
may be in either upper or lower case. Currently there are two switches
which are supported:
I :: Ignore case on/off ("+I" = on; "-I" = off). Ignore case is "off" by
default. HEX searches are always case sensitive regardless of usage of this
switch.
T :: Text mode on/off ("+T" = on; "-T" = off). Text mode is "off" by
default. When text mode is "on", LookFor will display a fragment of the
line containing the matched string and its approximate line number.
Usage Examples:
--------------
LookFor printf +t *.c *.h
LookFor AllocMem() +t +i auto.docs -i *.c
LookFor "the bridge" +i +t "dh0:My Documents/*"
LookFor _text *.o
LookFor $04080408 program.exe
Some legalease to bore you with...
LookFor is released by the author as FREEWARE. That means the following:
1) LookFor is NOT commercial or ShareWare and you are NOT required to pay
for it (although I'm not in the habit of refusing offers... $^)
2) LookFor is NOT Public Domain - it CANNOT be sold for profit or used
commercially without permission from the author
3) LookFor CAN be re-distributed freely in its original "ZOO" file with
the full contents intact
4) LookFor CAN appear on user club or compilation diskettes for which a
moderate duplication and/or media fee is charged - as long as the software
itself is not charged for
5) If you enjoy tinkering with things like this you are welcome to make
derivitive versions of LookFor and distribute them as long as credit is
given were credit is due and as long as the same limitations are applied as
put forth here (I would also very much like to see your atomic mods!).
6) The author is not responsible for damage resulting from the use or
misuse of this program
Lastly, if you would like to contact me with any comments, suggestions,
questions, insect sightings, etc., etc., etc., you may do so at the
following locals:
PLink: Analog*Kid
U.S. Snail: Ray Lambert
415 Sanford Road
Westport, Massachusetts 02790
Phone: (508) 672-8232