NAME find - search a file for text patterns SYNOPSIS find [-acx] expr [expr ...] DESCRIPTION find searches the standard input file for lines matching the text patterns "expr" (up to 9 patterns may be specified) according to the matching criterion specified by the switches. (A text pattern is a subset of a "regular expression"--see the writeup on "ed" for a complete description of regular expressions.) Unless the -c option is specified, each matching line is copied to the standard output. By default, any line which matches any one of the expressions is considered a matching line. If the -a flag is specified, only lines which match all expressions in any order are considered to match. If the -x flag is specified, all lines which don't satisfy the above criteria are considered matching lines. And finally, if the -c option is specified, matching lines are counted instead of being copied to the standard output, and the final count is written to the standard output. A text pattern consists of the following elements: c literal character ? any character except newline % beginning of line $ end of line (null string before newline) [...] character class (any one of these characters) [!...] negated character class (all but these characters) * closure (zero or more occurrences of previous pattern) @c escaped character (e.g., @%, @[, @*) Any special meaning of characters in a text pattern is lost when escaped, inside [...], or for: % not at beginning $ not at end * at beginning A character class consists of zero or more of the following elements, surrounded by [ and ]: c literal character, including [ a-b range of characters (digits, lower or upper case) ! negated character class if at beginning @c escaped character (@! @- @@ @]) Special meaning of characters in a character class is lost when escaped or for ! not at beginning - at beginning or end An escape sequence consists of the character @ followed by a single character: @n newline @t tab @c c (including @@) For a complete description, see "Software Tools" pages 135-154. Care should be taken when using the characters % $ [ ] ! * @ and any shell characters in the text pattern. It is often necessary to enclose the entire substitution pattern in quotes. FILES None SEE ALSO tr, ed, ch and the UNIX grep command. DIAGNOSTICS An error message is printed if one of the patterns given is illegal. AUTHORS Originally from Kernighan & Plauger's "Software Tools", with major modifications by Joe Sventek (Lawrence Berkeley Laboratory)