blank.gif (43 bytes)

Church Of The
Swimming Elephant

Search:

Generic Regular Expression Parse Options
Description
Usage

The following options are supported for both /usr/bin/grep and /usr/xpg4/bin/grep:
 

Option Description
b Precede each line by the block number on which it was found. This can be useful in locating block numbers by context (first block is 0).
c Print only a count of the lines that contain the pattern.
h Prevents the name of the file containing the matching line from being appended to that line. Used when searching multiple files.
i Ignore upper/lower case distinction during comparisons.
l Print only the names of files with matching lines, separated by NEWLINE characters. Does not repeat the names of files when the pattern is found more than once.
n Precede each line by its line number in the file (first line is 1).
s Suppress error messages about nonexistent or unreadable files.
v Print all lines except those that contain the pattern.
w Search for the expression as a word as if surrounded by \< and \>.

The following options are supported for /usr/xpg4/bin/grep only:
 

Option Description
epattern_list Specify one or more patterns to be used during the search for input. Patterns in pattern_list must be separated by a NEWLINE character. A null pattern can be specified by two adjacent newline characters in pattern_list. Unless the -E or -F option is also specified, each pattern will be treated as a basic regular expression. Multiple -e and -f options are accepted by grep . All of the specified patterns are used when matching lines, but the order of evaluation is unspecified.
E Match using full regular expressions. Treat each pattern specified as a full regular expression. If any entire full regular expression pattern matches an input line, the line will be matched. A null full regular expression matches every line. Each pattern will be interpreted as a full regular expression as described on the regex(5) manual page, except for \( and \), and including:
fpattern_file Read one or more patterns from the file named by the path name pattern_file. Patterns in pattern_file are terminated by a NEWLINE character. A null pattern can be specified by an empty line in pattern_file. Unless the -E or -F option is also specified, each pattern will be treated as a basic regular expression.
F Match using fixed strings. Treat each pattern specified as a string instead of a regular expres-sion. If an input line contains any of the patterns as a contiguous sequence of bytes, the line will be matched. A null string matches every line. See fgrep(1) for more information.
q Quiet. Do not write anything to the standard output, regardless of matching lines. Exit with zero status if an input line is selected.
x Consider only input lines that use all characters in the line to match an entire fixed string or regular expression to be matching lines.

Notes on -E
Match using full regular expressions. Treat each pattern specified as a full regular expression. If any entire full regular expression pattern matches an input line, the line will be matched. A null full regular expression matches every line. Each pattern will be interpreted as a full regular expression as described on the regex(5) manual page, except for \( and \), and including:

  • A full regular expression followed by + that matches one or more occurrences of the full regular expression.
  • 2. A full regular expression followed by ? that matches 0 or 1 occurrences of the full regular expression.
  • Full regular expressions separated by | or by a new-line that match strings that are matched by any of the expressions.
  • A full regular expression that may be enclosed in parentheses () for grouping. The order of precedence of operators is [], then *?+, then concatenation, then | and new-line.

 

Cotse.Net

Protect yourself from cyberstalkers, identity thieves, and those who would snoop on you.
Stop spam from invading your inbox without losing the mail you want. We give you more control over your e-mail than any other service.
Block popups, ads, and malicious scripts while you surf the net through our anonymous proxies.
Participate in Usenet, host your web files, easily send anonymous messages, and more, much more.
All private, all encrypted, all secure, all in an easy to use service, and all for only $5.95 a month!

Service Details

 
.
www.cotse.com
Have you gone to church today?
.
All pages ©1999, 2000, 2001, 2002, 2003 Church of the Swimming Elephant unless otherwise stated
Church of the Swimming Elephant©1999, 2000, 2001, 2002, 2003 Cotse.com.
Cotse.com is a wholly owned subsidiary of Packetderm, LLC.

Packetderm, LLC
210 Park Ave #308
Worcester, MA 01609