The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: grep and xargs
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 11-23-2007
freakygs freakygs is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 15
grep -p <pattern> <file>

gives the paragraphic view of the <pattern> value in the <file>

Man page info. pasted below:
-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.


Lemme know if u need any example