home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / TOP / USR / MAN / bm.man next >
Text File  |  2009-11-06  |  3KB  |  138 lines

  1.  
  2.  
  3.      Bm                      BASIC UTILITY COMMAND                       Bm
  4.  
  5.  
  6.      NNAAMMEE 
  7.           Bm - fast grep utility 
  8.  
  9.  
  10.      SSYYNNOOPPSSIISS 
  11.           bm [<opts>] [<expression>] [<path>] 
  12.  
  13.  
  14.      DDEESSCCRRIIPPTTIIOONN 
  15.           Bm   searches  the  input  (standard  input  default)  for  lines
  16.           matching  a   string.  Normally, each line found is copied to the
  17.           standard  output.  It   is  blindingly fast. Bm strings are fixed
  18.           sequences  of  characters:  there  are no wildcards, repetitions,
  19.           or  other  features  of  regular  expressions.   Bm  is also case
  20.           sensitive.  
  21.  
  22.           The following options are recognized.  
  23.  
  24.                -x (Exact) only lines matched in their entirety 
  25.                   are printed 
  26.  
  27.                -l The names of files with matching lines are 
  28.                   listed (once) separated by newlines.  
  29.  
  30.                -c Only a count of the number of matches is printed 
  31.  
  32.                -n Each line is preceded by the number of characters 
  33.                   from the beginning of the file to the match.  
  34.  
  35.                -s Silent mode. Nothing is printed (except error  
  36.                   messages). This is useful for checking 
  37.                   the error status.  
  38.  
  39.                -f <file> The string list is taken from the file.  
  40.  
  41.           In  all  cases  the  file name is shown if there is more than one
  42.           input file.  
  43.  
  44.           Care  should  be taken when using the characters  * [ ^ | ( ) and
  45.           in  the   strings  (listed  on the command line) as they are also
  46.           meaningful  to  the   Shell.  It  is safest to enclose the entire
  47.           expression  argument in single  quotes ' '. Bm searches for lines
  48.           that  contain  one of the  (newline-separated) strings, using the
  49.           Boyer-Moore  algorithm.  It is far  superior in terms of speed to
  50.           the   grep   family   of   pattern  matchers  for   fixed-pattern
  51.           searching,  and  its  speed  increases with pattern length.  Exit
  52.           status  is  0  if  any  matches  are  found,  1 if none. Only 100
  53.           patterns   are  allowed.  Patterns may not contain newlines. If a
  54.           line  (delimited  by   newlines, and the beginning and end of the
  55.           file)  is  longer  than 8000  charcters (e.g. in a core dump), it
  56.           will  not be completely printed.  Successive matches of different
  57.           patterns  may  appear  out of order. A line  will be printed once
  58.           for  each  different  string  on that line. The  algorithm cannot
  59.           count lines.  
  60.  
  61.           AUTHOR: Peter Bain (pdbain@wateng) 
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.      Page 1                                  Printed ( 1 Mai 1988  9:27:57)
  69.  
  70.  
  71.      Bm                      BASIC UTILITY COMMAND                       Bm
  72.  
  73.  
  74.      EEXXAAMMPPLLEESS 
  75.           bm #include *.c
  76.           bm Mike *.doc
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      Page 2                                  Printed ( 1 Mai 1988  9:27:58)
  137.  
  138.