- 论坛徽章:
- 1
|
redhat9中的grep怎么不支持-p
举个AIX下的例子吧
- $ cat >1
- -p[Separator] Displays the entire paragraph containing matched lines. Paragraphs
- are delimited by paragraph separators, as specified by the Separator parameter,
- which are patterns in the same form as the search pattern. Lines containing the
- paragraph separators are used only as separators; they are never included in the
- output. The default paragraph separator is a blank line.
- -q Suppresses all writing to standard output, regardless of matching lines.
- Exits with a zero status if an input line is selected. The -q flag with any
- combination of the -c, -l and -n flags behaves like the -q flag only.
- -s Suppresses error messages ordinarily written for nonexistent or unreadable
- files. Other error messages are not suppressed.
- $ grep -p delimited 1
- -p[Separator] Displays the entire paragraph containing matched lines. Paragraphs
- are delimited by paragraph separators, as specified by the Separator parameter,
- which are patterns in the same form as the search pattern. Lines containing the
- paragraph separators are used only as separators; they are never included in the
- output. The default paragraph separator is a blank line.
- $
复制代码 |
|