home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
EFFO
/
pd1.lzh
/
SYS
/
HELP
/
bm.hlp
next >
Wrap
Text File
|
1989-09-03
|
2KB
|
69 lines
@H
@T0
FUNCTION
Bm - fast grep utility
SYNOPSIS
bm [<opts>] [<expression>] [<path>]
DESCRIPTION
Bm searches the input (standard input default) for lines
matching a string. Normally, each line found is copied to the
standard output. It is blindingly fast. Bm strings are fixed
sequences of characters: there are no wildcards, repetitions,
or other features of regular expressions. Bm is also case
sensitive.
AUTHOR: Peter Bain (pdbain@wateng)
@D1
Options : 2
Notes : 3
Examples : 4
@T2
The following options are recognized:
-x (Exact) only lines matched in their entirety
are printed
-l The names of files with matching lines are
listed (once) separated by newlines.
-c Only a count of the number of matches is printed
-n Each line is preceded by the number of characters
from the beginning of the file to the match.
-s Silent mode. Nothing is printed (except error
messages). This is useful for checking
the error status.
-f <file> The string list is taken from the file.
In all cases the file name is shown if there is more than one
input file.
@T3
Care should be taken when using the characters * ? @ ^ # < and >
in the strings (listed on the command line) as they are also
meaningful to the Shell. It is safest to enclose the entire
expression argument in double quotes " ". Bm searches for lines
that contain one of the (newline-separated) strings, using the
Boyer-Moore algorithm. It is far superior in terms of speed to
the grep family of pattern matchers for fixed-pattern
searching, and its speed increases with pattern length. Exit
status is 0 if any matches are found, 1 if none. Only 100
patterns are allowed. Patterns may not contain newlines. If a
line (delimited by newlines, and the beginning and end of the
file) is longer than 8000 charcters (e.g. in a core dump), it
will not be completely printed. Successive matches of different
patterns may appear out of order. A line will be printed once
for each different string on that line. The algorithm cannot
count lines.
@T4
EXAMPLES
bm #include *.c
bm Mike *.doc