Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

grep -p --- is there an equivalent??

Status
Not open for further replies.

denisl

Technical User
Jun 18, 2001
36
0
0
US
Does anyone what command/script could be used to achieve the same as AIX's grep -p for use on other unix systems like HP-UX or Solaris?

Thanks,
Denis
 
Okay.. My mistake.
grep -p 'grep's' the entire paragraph that the search argument is in.. For example:

grep -p 'argument' would return everything I just typed above..

Thanks..
 
The AIX man page for grep has this re. the -p option:

"-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."

Does this help anyone? I don't know of an equivalent in Solaris/HP.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top