GREP.1
Upload User: jnzhq888
Upload Date: 2007-01-18
Package Size: 51694k
Code Size: 1k
Category:

OS Develop

Development Platform:

WINDOWS

  1. GREP(1)                   Minix Programmer's Manual                    GREP(1)
  2. NAME
  3.      grep - search a file for lines containing a given pattern
  4. SYNOPSIS
  5.      grep [-elnsv] pattern [file] ...
  6. OPTIONS
  7.      -e   -e pattern is the same as pattern
  8.      -c   Print a count of lines matched
  9.      -i   Ignore case
  10.      -l   Print file names, no lines
  11.      -n   Print line numbers
  12.      -s   Status only, no printed output
  13.      -v   Select lines that do not match
  14. EXAMPLES
  15.      grep mouse file     # Find lines in file containing mouse
  16.      grep [0-9] file     # Print lines containing a digit
  17. DESCRIPTION
  18.      Grep searches one or more files (by default, stdin) and selects  out  all
  19.      the  lines  that match the pattern.  All the regular expressions accepted
  20.      by ed and mined are allowed.  In addition, + can be used instead of *  to
  21.      mean 1 or more occurrences, ? can be used to mean 0 or 1 occurrences, and
  22.      | can be used between two regular expressions to mean either one of them.
  23.      Parentheses can be used for grouping.  If a match is found, exit status 0
  24.      is returned.  If no match is found, exit status 1  is  returned.   If  an
  25.      error is detected, exit status 2 is returned.
  26. SEE ALSO
  27.      cgrep(1), fgrep(1), sed(1), awk(9).
  28.                                                                              1