此内容没有您所选择的语言版本。
2.6. shell:grep, grep
Abstract
displays lines matching a regular expression
Synopsis
shell:grep
[
--help
] [[
-i
] | [
--ignore-case
]] [[
-w
] | [
--word-regexp
]] [[
-n
] | [
--line-number
]] [[
-x
] | [
--line-regexp
]] [[
-v
] | [
--invert-match
]] {
regex
}
Arguments
Table 2.6, “shell:grep Arguments” describes the command's arguments.
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
-i, --ignore-case | Ignore case distinctions in both the regex and the input files. |
-w, --word-regexp |
Select only lines containing matches that form whole words.
A match qualifies if it meets one of the following conditions:
|
-n, --line-number | Display the line number of the match within its input file. |
-x, --line-regexp | Selects only those matches that exactly match the whole line. |
-v, --invert-match | Select non-matching lines. |
regex | Specifies the regular expression to match. |