PCREGREP(1) General Commands Manual PCREGREP(1) (NAME) pcregrep - (SYNOPSIS) pcregrep [] [ ] [] [ ...] (DESCRIPTION) pcregrep grep () PCRE (Perl 5) . pcresyntax(3) PCRE pcrepattern(3) . (delimiters) . : pcregrep Thursday /etc/motd ( ) . () () (shell metacharacters) . -e -f . . -e -f . pcregrep . . : pcregrep some-pattern /file1 - /file3 (:) . pcregrep . -M . -N (--newline) . --buffer-size . pcregrep 20K . ( <<>> <<>>). . 8K BUFSIZ ( ) . BUFSIZ . ( -e / -f ) -e -f . . --colour ( --color) --only-matching --file-offsets --line-offsets ( ) . . . GNU grep ( ) . . "(super)?(man)?" . "super" "man" "super|man" . LC_ALL LC_CTYPE pcregrep PCRE (locale) . --locale . (SUPPORT FOR COMPRESSED FILES) pcregrep libz libbz2 .gz .bz2 . --help () . . . (BINARY FILES) (null byte) . (GNU grep .) --binary-files . (OPTIONS) . -h -l . . . K M * . -- . . . -A , --after-context= . / . "--" . . pcregrep 8K . -a, --text . --binary-files=text . -B , --before-context= . / . "--" . . pcregrep 8K . --binary-files= . "binary" () "Binary file matches" . "text" -a --text . . "without-match" -I . --buffer-size= . -C , --context= . -A -B . -c, --count . . . --files-with-matches . -c -A -B -C . --colour, --color "--colour=auto" . . --colour=, --color= . . ( ) "never" "always" "auto" . . pcregrep . PCREGREP_COLOUR PCREGREP_COLOR . . . "1;31" . -D , --devices= "" . "read" () "skip" ( ) . -d , --directories= "" . "read" ( GNU grep) "recurse" ( -r) "skip" ( ). "read" . (EOF) . -e , --regex=, --regexp= . . . -e . . . -f -e (). -e . X|Y X Y X pcregrep X Y . Y X . -o --colo(u)r () . --exclude= ( ) . --file-list . PCRE . -F -w -x . . --include --exclude ( ). . --exclude-from= --exclude . . --newline . . --exclude-dir= --recursive . --file-list . PCRE . -F -w -x . . --include-dir --exclude-dir . . -F, --fixed-strings . --newline . -w ( ) -x ( ) -F . . ( -w -x ). --include --exclude . -f , --file= . . --newline . . . -e . . . "-" . -f -e . . --file-list= / . . . "-" . --file --file-list "-" . ( ) (EOF) . . --file-offsets . . -A -B -C . . --line-offsets --only-matching . -H, --with-filename . . (:) . . -h, --no-filename . . . . --help . . -I . --binary-files=without-match . -i, --ignore-case . --include= --include ( --exclude ). --file-list . PCRE . -F -w -x . . --include --exclude . . --include-from= --include . . --newline . . --include-dir= --include-dir ( --exclude-dir ). --file-list . PCRE . -F -w -x . . --include-dir --exclude-dir . . -L, --files-without-match . . -l, --files-with-matches . . . -c () . -c . --label= . "(standard input)" . . --line-buffered (flush) . pcregrep ( ). . (pipe) pcregrep . -M () . --line-offsets . ( -n ) . . -A -B -C . . --file-offsets --only-matching . --locale=- (locale) . LC_ALL LC_CTYPE . PCRE ( "C") . . --match-limit= (crash) . . pcre_exec() pcregrep . --match-limit . . PCRE match() ( ) . --match-limit (backtracking) . --recursion-limit --match-limit match() . match() . --match-limit . . PCRE . -M, --multiline . ^ $ . . . PCRE <<>> (multiline) . pcregrep . pcregrep 8K ( ) 8K ( 8K ) (lookbehind assertions) . ( --line-buffered ). -N --, --newline=-- PCRE . CR ( ) LF ( ) CRLF "anycrlf" "any" . VT ( U+000B) FF ( U+000C) NEL ( U+0085) LS ( U+2028) PS ( U+2029). PCRE . . pcregrep . CR LF CRLF ANYCRLF ANY. pcregrep . pcregrep . -f --exclude-from --include-from . -n, --line-number (:) (-) . . --line-offsets . --no-jit PCRE (JIT - Just-In-Time) ( ) pcregrep . JIT . . . -o, --only-matching . . -A -B -C . . -o -v ( ) . . --file-offsets --line-offsets . -o, --only-matching= (capturing parentheses) . -o0 -o . ( ) -o3 --only-matching=2. . . . -o3 -o1 -o3 . ( ). --om-separator= -o. . . -q, --quiet () . . -r, --recursive --include --exclude . (EOF) . -d "recurse" . --recursion-limit= --match-limit . -s, --no-messages . . . -u, --utf-8 UTF-8. PCRE UTF-8 . ( --exclude --include) UTF-8 . -V, --version pcregrep PCRE . . -v, --invert-match . -w, --word-regex, --word-regexp . \b . --include --exclude . -x, --line-regex, --line-regexp ( ) . ^ $ . --include --exclude . (ENVIRONMENT VARIABLES) LC_ALL LC_CTYPE (locale) . . --locale . PCRE ( "C") . (NEWLINES) -N (--newline) pcregrep . . -f --exclude-from --include-from pcregrep . "\n" / C . (OPTIONS COMPATIBILITY) pcregrep GNU grep . --xxx-regexp ( GNU) --xxx-regex ( PCRE) . --file-list --file-offsets --include-dir --line-offsets --locale --match-limit -M --multiline -N --newline --om-separator --recursion-limit -u --utf-8 pcregrep --only-matching . pcregrep . --include GNU grep (glob) pcregrep . -c -l GNU grep pcregrep . (OPTIONS WITH DATA) . ( ) . : -f/some/file -f /some/file -o . -o3. ( ) . : --file=/some/file --file /some/file ~ ~ ~ . --colour ( --color) --only-matching . . pcregrep . (MATCHING ERRORS) . : (a+)*\d a . PCRE . pcregrep . pcregrep . --match-limit pcregrep --recursion-limit ( stack) ( ). (EXIT STATUS) ( ) . -s . (SEE ALSO) pcrepattern(3), pcresyntax(3), pcretest(1). (AUTHOR) Philip Hazel University Computing Service Cambridge CB2 3QH, England. (REVISION) Last updated: 03 April 2014 Copyright (c) 1997-2014 University of Cambridge. PCRE 8.35 03 April 2014 PCREGREP(1)