Lines Matching +full:output +full:- +full:files
3 pcre2grep - a grep with Perl-compatible regular expressions.
10 \fBpcre2grep\fP searches files for character patterns, in the same way as other
16 for a quick-reference summary of pattern syntax, or
35 pattern to be matched when neither \fB-e\fP nor \fB-f\fP is present.
37 arguments are treated as path names. At least one of \fB-e\fP, \fB-f\fP, or an
40 If no files are specified, \fBpcre2grep\fP reads the standard input. The
44 pcre2grep some-pattern file1 - file3
46 By default, input files are searched line by line, so pattern assertions about
49 to the standard output, and if there is more than one file, the file name is
50 output at the start of each line, followed by a colon. However, there are
51 options that can change how \fBpcre2grep\fP behaves. For example, the \fB-M\fP
53 defines a line boundary is controlled by the \fB-N\fP (\fB--newline\fP) option.
54 The \fB-h\fP and \fB-H\fP options control whether or not file names are shown,
55 and the \fB-Z\fP option changes the file name terminator to a zero byte.
57 The amount of memory used for buffering files that are being scanned is
58 controlled by parameters that can be set by the \fB--buffer-size\fP and
59 \fB--max-buffer-size\fP options. The first of these sets the size of buffer
62 extending the buffer, up to the limit specified by \fB--max-buffer-size\fP. The
70 small, fewer than requested "before" and "after" lines may be output.
77 (specified by the use of \fB-e\fP and/or \fB-f\fP), each pattern is applied to
78 each line in the order in which they are defined, except that all the \fB-e\fP
79 patterns are tried before the \fB-f\fP patterns.
82 considered. However, if \fB--colour\fP (or \fB--color\fP) is used to colour the
83 matching substrings, or if \fB--only-matching\fP, \fB--file-offsets\fP,
84 \fB--line-offsets\fP, or \fB--output\fP is used to output only the part of the
103 "super" and "man"; the output differs from matching with "super|man" when only
108 The \fB--locale\fP option can be used to override this.
111 .SH "SUPPORT FOR COMPRESSED FILES"
114 Compile-time options for \fBpcre2grep\fP can set it up to use \fBlibz\fP or
115 \fBlibbz2\fP for reading compressed files whose names end in \fB.gz\fP or
118 \fB--help\fP option. If the appropriate support is not present, all files are
122 \fB--line-buffered\fP option is ignored.
125 .SH "BINARY FILES"
131 zero, the test for a binary file is not applied. See the \fB--binary-files\fP
132 option for a means of changing the way binary files are handled.
140 from a file via the \fB-f\fP option may contain binary zeros.
146 The order in which some of the options appear can affect the output. For
147 example, both the \fB-H\fP and \fB-l\fP options affect the printing of file
153 \fB--\fP
158 \fB-A\fP \fInumber\fP, \fB--after-context=\fP\fInumber\fP
159 Output up to \fInumber\fP lines of context after each matching line. Fewer
160 lines are output if the next match or the end of the file is reached, or if the
162 numbers are being output, a hyphen separator is used instead of a colon for the
163 context lines (the \fB-Z\fP option can be used to change the file name
164 terminator to a zero byte). A line containing "--" is output between each group
166 \fInumber\fP is expected to be relatively small. When \fB-c\fP is used,
167 \fB-A\fP is ignored.
169 \fB-a\fP, \fB--text\fP
170 Treat binary files as text. This is equivalent to
171 \fB--binary-files\fP=\fItext\fP.
173 \fB--allow-lookaround-bsk\fP
178 \fB-B\fP \fInumber\fP, \fB--before-context=\fP\fInumber\fP
179 Output up to \fInumber\fP lines of context before each matching line. Fewer
180 lines are output if the previous match or the start of the file is within
182 file names and/or line numbers are being output, a hyphen separator is used
183 instead of a colon for the context lines (the \fB-Z\fP option can be used to
184 change the file name terminator to a zero byte). A line containing "--" is
185 output between each group of lines, unless they are in fact contiguous in the
187 \fB-c\fP is used, \fB-B\fP is ignored.
189 \fB--binary-files=\fP\fIword\fP
190 Specify how binary files are to be processed. If the word is "binary" (the
191 default), pattern matching is performed on binary files, but the only output is
193 which is equivalent to the \fB-a\fP or \fB--text\fP option, binary files are
195 succeeds, the output may be binary garbage, which can have nasty effects if
196 sent to a terminal. If the word is "without-match", which is equivalent to the
197 \fB-I\fP option, binary files are not processed at all; they are assumed not to
198 be of interest and are skipped without causing any output or affecting the
201 \fB--buffer-size=\fP\fInumber\fP
203 processing for buffering files that are being scanned. See also
204 \fB--max-buffer-size\fP below.
206 \fB-C\fP \fInumber\fP, \fB--context=\fP\fInumber\fP
207 Output \fInumber\fP lines of context both before and after each matching line.
208 This is equivalent to setting both \fB-A\fP and \fB-B\fP to the same value.
210 \fB-c\fP, \fB--count\fP
211 Do not output lines from the files that are being scanned; instead output the
213 \fB-v\fP is set, because they failed to match. By default, this count is
214 exactly the same as the number of lines that would have been output, but if the
215 \fB-M\fP (multiline) option is used (without \fB-v\fP), there may be more
218 If no lines are selected, the number zero is output. If several files are
219 being scanned, a count is output for each of them and the \fB-t\fP option can
220 be used to cause a total to be output at the end. However, if the
221 \fB--files-with-matches\fP option is also used, only those files whose counts
222 are greater than zero are listed. When \fB-c\fP is used, the \fB-A\fP,
223 \fB-B\fP, and \fB-C\fP options are ignored.
225 \fB--colour\fP, \fB--color\fP
226 If this option is given without any data, it is equivalent to "--colour=auto".
230 \fB--colour=\fP\fIvalue\fP, \fB--color=\fP\fIvalue\fP
232 a pattern should be coloured in the output. It is ignored if
233 \fB--file-offsets\fP, \fB--line-offsets\fP, or \fB--output\fP is set. By
234 default, output is not coloured. The value for the \fB--colour\fP option (which
236 case, colouring happens only if the standard output is connected to a terminal.
247 followed by two semicolon-separated colours, terminated by the end of the
258 \fB-D\fP \fIaction\fP, \fB--devices=\fP\fIaction\fP
263 \fB-d\fP \fIaction\fP, \fB--directories=\fP\fIaction\fP
265 Valid values are "read" (the default in non-Windows environments, for
266 compatibility with GNU grep), "recurse" (equivalent to the \fB-r\fP option), or
268 "read" case, directories are read as if they were ordinary files. In some
270 end-of-file; in others it may provoke an error.
272 \fB--depth-limit\fP=\fInumber\fP
273 See \fB--match-limit\fP below.
275 \fB-E\fP, \fB--case-restrict\fP
280 character matches a non-ASCII character, and vice versa.
282 \fB-e\fP \fIpattern\fP, \fB--regex=\fP\fIpattern\fP, \fB--regexp=\fP\fIpattern\fP
285 single pattern that starts with a hyphen. When \fB-e\fP is used, no argument
290 If \fB-f\fP is used with \fB-e\fP, the command line patterns are matched first,
294 \fB--exclude\fP=\fIpattern\fP
295 Files (but not directories) whose names match the pattern are skipped without
296 being processed. This applies to all files, whether listed on the command line,
297 obtained from \fB--file-list\fP, or by scanning a directory. The pattern is a
299 file name, not the entire path. The \fB-F\fP, \fB-w\fP, and \fB-x\fP options do
301 to specify multiple patterns. If a file name matches both an \fB--include\fP
302 and an \fB--exclude\fP pattern, it is excluded. There is no short form for this
305 \fB--exclude-from=\fP\fIfilename\fP
306 Treat each non-empty line of the file as the data for an \fB--exclude\fP
308 system's default. The \fB--newline\fP option has no effect on this option. This
309 option may be given more than once in order to specify a number of files to
312 \fB--exclude-dir\fP=\fIpattern\fP
314 whatever the setting of the \fB--recursive\fP option. This applies to all
316 \fB--file-list\fP, or by scanning a parent directory. The pattern is a PCRE2
318 name, not the entire path. The \fB-F\fP, \fB-w\fP, and \fB-x\fP options do not
320 specify more than one pattern. If a directory matches both \fB--include-dir\fP
321 and \fB--exclude-dir\fP, it is excluded. There is no short form for this
324 \fB-F\fP, \fB--fixed-strings\fP
325 Interpret each data-matching pattern as a list of fixed strings, separated by
327 this purpose is controlled by the \fB--newline\fP option. The \fB-w\fP (match
328 as a word) and \fB-x\fP (match whole line) options can be used with \fB-F\fP.
330 strings are found in it (subject to \fB-w\fP or \fB-x\fP, if present). This
332 files; it does not apply to patterns specified by any of the \fB--include\fP or
333 \fB--exclude\fP options.
335 \fB-f\fP \fIfilename\fP, \fB--file=\fP\fIfilename\fP
339 \fB--newline\fP option has no effect on this option. Trailing white space is
344 If this option is given more than once, all the specified files are read. A
345 data line is output if any of the patterns match it. A file name can be given
346 as "-" to refer to the standard input. When \fB-f\fP is used, patterns
347 specified on the command line using \fB-e\fP may also be present; they are
351 \fB--file-list\fP=\fIfilename\fP
352 Read a list of files and/or directories that are to be scanned from the given
356 on the command line. The file name can be given as "-" to refer to the standard
357 input. If \fB--file\fP and \fB--file-list\fP are both specified as "-",
359 terminal, from which further lines (the list of files) can be read after an
360 end-of-file indication. If this option is given more than once, all the
361 specified files are read.
363 \fB--file-offsets\fP
366 mode, \fB--colour\fP has no effect, and no context is shown. That is, the
367 \fB-A\fP, \fB-B\fP, and \fB-C\fP options are ignored. If there is more than one
369 exclusive with \fB--output\fP, \fB--line-offsets\fP, and \fB--only-matching\fP.
371 \fB--group-separator\fP=\fItext\fP
372 Output this text string instead of two hyphens between groups of lines when
373 \fB-A\fP, \fB-B\fP, or \fB-C\fP is in use. See also \fB--no-group-separator\fP.
375 \fB-H\fP, \fB--with-filename\fP
376 Force the inclusion of the file name at the start of output lines when
379 context lines, a hyphen separator is used. The \fB-Z\fP option can be used to
380 change the terminator to a zero byte. If a line number is also being output,
381 it follows the file name. When the \fB-M\fP option causes a pattern to match
383 overrides any previous \fB-h\fP, \fB-l\fP, or \fB-L\fP options.
385 \fB-h\fP, \fB--no-filename\fP
386 Suppress the output file names when searching multiple files. File names are
387 normally shown when multiple files are searched. By default, for matching
389 separator is used. The \fB-Z\fP option can be used to change the terminator to
390 a zero byte. If a line number is also being output, it follows the file name.
391 This option overrides any previous \fB-H\fP, \fB-L\fP, or \fB-l\fP options.
393 \fB--heap-limit\fP=\fInumber\fP
394 See \fB--match-limit\fP below.
396 \fB--help\fP
397 Output a help message, giving brief details of the command options and file
401 \fB-I\fP
402 Ignore binary files. This is equivalent to
403 \fB--binary-files\fP=\fIwithout-match\fP.
405 \fB-i\fP, \fB--ignore-case\fP
408 in files.
410 \fB--include\fP=\fIpattern\fP
411 If any \fB--include\fP patterns are specified, the only files that are
413 \fB--exclude\fP pattern. This option does not affect directories, but it
414 applies to all files, whether listed on the command line, obtained from
415 \fB--file-list\fP, or by scanning a directory. The pattern is a PCRE2 regular
417 the entire path. The \fB-F\fP, \fB-w\fP, and \fB-x\fP options do not apply to
419 matches both an \fB--include\fP and an \fB--exclude\fP pattern, it is excluded.
422 \fB--include-from=\fP\fIfilename\fP
423 Treat each non-empty line of the file as the data for an \fB--include\fP
425 default. The \fB--newline\fP option has no effect on this option. This option
426 may be given any number of times; all the files are read.
428 \fB--include-dir\fP=\fIpattern\fP
429 If any \fB--include-dir\fP patterns are specified, the only directories that
431 an \fB--exclude-dir\fP pattern. This applies to all directories, whether listed
432 on the command line, obtained from \fB--file-list\fP, or by scanning a parent
434 the final component of the directory name, not the entire path. The \fB-F\fP,
435 \fB-w\fP, and \fB-x\fP options do not apply to this pattern. The option may be
436 given any number of times. If a directory matches both \fB--include-dir\fP and
437 \fB--exclude-dir\fP, it is excluded. There is no short form for this option.
439 \fB-L\fP, \fB--files-without-match\fP
440 Instead of outputting lines from the files, just output the names of the files
441 that do not contain any lines that would have been output. Each file name is
442 output once, on a separate line by default, but if the \fB-Z\fP option is set,
444 previous \fB-H\fP, \fB-h\fP, or \fB-l\fP options.
446 \fB-l\fP, \fB--files-with-matches\fP
447 Instead of outputting lines from the files, just output the names of the files
448 containing lines that would have been output. Each file name is output once, on
449 a separate line, but if the \fB-Z\fP option is set, they are separated by zero
451 is found in a file. However, if the \fB-c\fP (count) option is also used,
452 matching continues in order to obtain the correct count, and those files that
454 with \fB-c\fP is a way of suppressing the listing of files with no matches that
455 occurs with \fB-c\fP on its own. This option overrides any previous \fB-H\fP,
456 \fB-h\fP, or \fB-L\fP options.
458 \fB--label\fP=\fIname\fP
460 are being output. If not supplied, "(standard input)" is used. There is no
463 \fB--line-buffered\fP
464 When this option is given, non-compressed input is read and processed line by
465 line, and the output is flushed after each write. By default, input is read in
467 terminal, which is currently possible only in Unix-like environments or
468 Windows. Output to terminal is normally automatically flushed by the operating
469 system. This option can be useful when the input or output is attached to a
471 However, its use will affect performance, and the \fB-M\fP (multiline) option
473 \fB--line-buffered\fP is ignored.
475 \fB--line-offsets\fP
478 number is terminated by a colon (as usual; see the \fB-n\fP option), and the
479 offset and length are separated by a comma. In this mode, \fB--colour\fP has no
480 effect, and no context is shown. That is, the \fB-A\fP, \fB-B\fP, and \fB-C\fP
482 shown separately. This option is mutually exclusive with \fB--output\fP,
483 \fB--file-offsets\fP, and \fB--only-matching\fP.
485 \fB--locale\fP=\fIlocale-name\fP
491 \fB-M\fP, \fB--multiline\fP
496 Patterns used with \fB-M\fP may usefully contain literal newline characters and
503 The output for a successful match may consist of more than one line. The first
506 output ends at the end of that line. If \fB-v\fP is set, none of the lines in a
507 multi-line match are output. Once a match has been handled, scanning restarts
515 pcre2grep -M 'regular\es+expression' <file>
519 well as possibly handling a two-character newline sequence.
525 The \fB-M\fP option does not work when input is read line by line (see
526 \fB--line-buffered\fP.)
528 \fB-m\fP \fInumber\fP, \fB--max-count\fP=\fInumber\fP
529 Stop processing after finding \fInumber\fP matching lines, or non-matching
530 lines if \fB-v\fP is also set. Any trailing context lines are output after the
534 If \fB-c\fP is also set, the count that is output is never greater than
535 \fInumber\fP. This option has no effect if used with \fB-L\fP, \fB-l\fP, or
536 \fB-q\fP, or when just checking for a match in a binary file.
538 \fB--match-limit\fP=\fInumber\fP
543 The \fB--match-limit\fP option provides a means of limiting computing resource
548 value set by \fB--match-limit\fP is reached, an error occurs.
550 The \fB--heap-limit\fP option specifies, as a number of kibibytes (units of
553 The \fB--depth-limit\fP option limits the depth of nested backtracking points,
558 set smaller than \fB--match-limit\fP.
564 \fB--max-buffer-size\fP=\fInumber\fP
566 set by \fB--buffer-size\fP. The maximum buffer size is silently forced to be no
569 \fB-N\fP \fInewline-type\fP, \fB--newline\fP=\fInewline-type\fP
570 Six different conventions for indicating the ends of lines in scanned files are
573 pcre2grep -N CRLF 'some pattern' <file>
577 types are the single-character sequences CR (carriage return) and LF
578 (linefeed), the two-character sequence CRLF, an "anycrlf" type, which
585 When the PCRE2 library is built, a default line-ending sequence is specified.
589 This option makes it possible to use \fBpcre2grep\fP to scan files that have
593 not apply to files specified by the \fB-f\fP, \fB--exclude-from\fP, or
594 \fB--include-from\fP options, which are expected to use the operating system's
597 \fB-n\fP, \fB--line-number\fP
598 Precede each output line by its line number in the file, followed by a colon
600 being output, it precedes the line number. When the \fB-M\fP option causes a
602 number. This option is forced if \fB--line-offsets\fP is used.
604 \fB--no-group-separator\fP
605 Do not output a separator between groups of lines when \fB-A\fP, \fB-B\fP, or
606 \fB-C\fP is in use. The default is to output a line containing two hyphens. See
607 also \fB--group-separator\fP.
609 \fB--no-jit\fP
610 If the PCRE2 library is built with support for just-in-time compiling (which
616 \fB-O\fP \fItext\fP, \fB--output\fP=\fItext\fP
617 When there is a match, instead of outputting the line that matched, output just
618 the text specified in this option, followed by an operating-system standard
619 newline. In this mode, \fB--colour\fP has no effect, and no context is shown.
620 That is, the \fB-A\fP, \fB-B\fP, and \fB-C\fP options are ignored. The
621 \fB--newline\fP option has no effect on this option, which is mutually
622 exclusive with \fB--only-matching\fP, \fB--file-offsets\fP, and
623 \fB--line-offsets\fP. However, like \fB--only-matching\fP, if there is more
624 than one match in a line, each of them causes a line of output.
651 \fB-o\fP, \fB--only-matching\fP
653 line. In this mode, no context is shown. That is, the \fB-A\fP, \fB-B\fP, and
654 \fB-C\fP options are ignored. If there is more than one match in a line, each
655 of them is shown separately, on a separate line of output. If \fB-o\fP is
656 combined with \fB-v\fP (invert the sense of the match to find non-matching
657 lines), no output is generated, but the return code is set appropriately. If
658 the matched portion of the line is empty, nothing is output unless the file
660 otherwise empty line. This option is mutually exclusive with \fB--output\fP,
661 \fB--file-offsets\fP and \fB--line-offsets\fP.
663 \fB-o\fP\fInumber\fP, \fB--only-matching\fP=\fInumber\fP
666 limit can be changed via the \fB--om-capture\fP option. A pattern may contain
668 limit can be accessed by \fB-o\fP. An error occurs if the number specified by
669 \fB-o\fP is greater than the limit.
671 -o0 is the same as \fB-o\fP without a number. Because these options can be
673 given in the same shell item, for example, -o3 or --only-matching=2. The
674 comments given for the non-argument case above also apply to this option. If
676 set in the match, nothing is output unless the file name or line number are
677 being output.
679 If this option is given multiple times, multiple substrings are output for each
681 -o3 -o1 -o3 causes the substrings matched by capturing parentheses 3 and 1 and
682 then 3 again to be output. By default, there is no separator (but see the next
685 \fB--om-capture\fP=\fInumber\fP
686 Set the number of capturing parentheses that can be accessed by \fB-o\fP. The
689 \fB--om-separator\fP=\fItext\fP
690 Specify a separating string for multiple occurrences of \fB-o\fP. The default
693 \fB-P\fP, \fB--no-ucp\fP
694 Starting from release 10.43, when UTF/Unicode mode is specified with \fB-u\fP
695 or \fB-U\fP, the PCRE2_UCP option is used by default. This means that the
697 [:digit:] matches any Unicode decimal digit. The \fB--no-ucp\fP option
699 as was the case in earlier releases. Note that there are now more fine-grained
704 \fB-q\fP, \fB--quiet\fP
708 \fB-r\fP, \fB--recursive\fP
709 If any given path is a directory, recursively scan the files it contains,
710 taking note of any \fB--include\fP and \fB--exclude\fP settings. By default, a
712 immediate end-of-file. This option is a shorthand for setting the \fB-d\fP
715 \fB--recursion-limit\fP=\fInumber\fP
716 This is an obsolete synonym for \fB--depth-limit\fP. See \fB--match-limit\fP
719 \fB-s\fP, \fB--no-messages\fP
720 Suppress error messages about non-existent or unreadable files. Such files are
722 found in other files.
724 \fB-t\fP, \fB--total-count\fP
726 \fB-t\fP suppresses all output except for a grand total number of matching
727 lines (or non-matching lines if \fB-v\fP is used) in all the files. If \fB-t\fP
728 is used with \fB-c\fP, a grand total is output except when the previous output
729 is just one line. In other words, it is not output when just one file's count
730 is listed. If file names are being output, the grand total is preceded by
731 "TOTAL:". Otherwise, it appears as just another number. The \fB-t\fP option is
732 ignored when used with \fB-L\fP (list files without matches), because the grand
735 \fB-u\fP, \fB--utf\fP
737 compiled with UTF-8 support. All patterns (including those for any
738 \fB--exclude\fP and \fB--include\fP options) and all lines that are scanned
739 must be valid strings of UTF-8 characters. If an invalid UTF-8 string is
742 \fB-U\fP, \fB--utf-allow-invalid\fP
743 As \fB--utf\fP, but in addition subject lines may contain invalid UTF-8 code
745 themselves, however, must still be valid UTF-8 strings. This facility allows
746 valid UTF-8 strings to be sought within arbitrary byte sequences in executable
747 or other binary files. For more details about matching in non-valid UTF-8
754 \fB-V\fP, \fB--version\fP
756 standard output and then exit. Anything else on the command line is
759 \fB-v\fP, \fB--invert-match\fP
762 as \fB--only-matching\fP and \fB--output\fP, which specify parts of a match
763 that are to be output, are ignored.
765 \fB-w\fP, \fB--word-regex\fP, \fB--word-regexp\fP
770 files; it does not apply to patterns specified by any of the \fB--include\fP or
771 \fB--exclude\fP options.
773 \fB-x\fP, \fB--line-regex\fP, \fB--line-regexp\fP
778 matched against the contents of files; it does not apply to patterns specified
779 by any of the \fB--include\fP or \fB--exclude\fP options.
781 \fB-Z\fP, \fB--null\fP
782 Terminate files names in the regular output with a zero byte (the NUL
793 by the \fB--locale\fP option. If no locale is set, the PCRE2 library's default
800 The \fB-N\fP (\fB--newline\fP) option allows \fBpcre2grep\fP to scan files with
802 way scanned files are processed. It does not affect the interpretation of files
803 specified by the \fB-f\fP, \fB--file-list\fP, \fB--exclude-from\fP, or
804 \fB--include-from\fP options.
806 Any parts of the scanned input files that are written to the standard output
808 the final line of a file is output, and it does not end with a newline
810 or NUL, that line ending is output; for the other settings (ANYCRLF or ANY) a
814 newlines in informational messages to the standard output and error streams.
815 Under Windows, the standard output is set to be binary, so that "\er\en" at the
816 ends of output lines that are copied from the input is not converted to
818 standard output must end with "\er\en". For all other operating systems, and
826 in the GNU \fBgrep\fP program. Any long option of the form \fB--xxx-regexp\fP
827 (GNU terminology) is also available as \fB--xxx-regex\fP (PCRE2 terminology).
828 However, the \fB--case-restrict\fP, \fB--depth-limit\fP, \fB-E\fP,
829 \fB--file-list\fP, \fB--file-offsets\fP, \fB--heap-limit\fP,
830 \fB--include-dir\fP, \fB--line-offsets\fP, \fB--locale\fP, \fB--match-limit\fP,
831 \fB-M\fP, \fB--multiline\fP, \fB-N\fP, \fB--newline\fP, \fB--no-ucp\fP,
832 \fB--om-separator\fP, \fB--output\fP, \fB-P\fP, \fB-u\fP, \fB--utf\fP,
833 \fB-U\fP, and \fB--utf-allow-invalid\fP options are specific to
834 \fBpcre2grep\fP, as is the use of the \fB--only-matching\fP option with a
838 \fBpcre2grep\fP. For example, the \fB--include\fP option's argument is a glob
840 the \fB-i\fP option applies. If both the \fB-c\fP and \fB-l\fP options are
852 -f/some/file
853 -f /some/file
855 The exception is the \fB-o\fP option, which may appear with or without data.
857 item, for example -o3.
863 --file=/some/file
864 --file /some/file
871 The exceptions to the above are the \fB--colour\fP (or \fB--color\fP) and
872 \fB--only-matching\fP options, for which the data is optional. If one of these
884 for callouts by running it with the \fB--help\fP option. If callout support is
905 zero-terminated string, which means it should not contain any internal binary
906 zeros. It is written to the output, having first been passed through the same
907 escape processing as text from the \fB--output\fP (\fB-O\fP) option (see
912 output string, so if you want a newline, you must include it explicitly using
917 Matching continues normally after the string is output. If you want to see only
918 the callout output but not any output from an actual match, you should end the
927 where \fBlib$spawn()\fP is used, and for any Unix-like environment where
938 started by a dollar character. These are the same as for the \fB--output\fP
939 (\fB-O\fP) option documented above, except that $0 cannot insert the matched
944 echo -e "abcde\en12345" | pcre2grep \e
946 (?C"/bin/echo|Arg1: [$1] [$2] [$3]|Arg2: $|${1}$| ($4)")()' -
948 Output:
956 are zero-terminated strings. This means that binary zero characters in the
960 If running the program fails for any reason (including the non-existence of the
976 The \fB--match-limit\fP option of \fBpcre2grep\fP can be used to set the
978 memory used during matching; see the discussion of \fB--heap-limit\fP and
979 \fB--depth-limit\fP above.
986 for syntax errors, overlong lines, non-existent or inaccessible files (even if
987 matches were found in other files) or too many matching errors. Using the
988 \fB-s\fP option to suppress error messages about inaccessible files does not
1017 Copyright (c) 1997-2023 University of Cambridge.