it worked but
one extra line with --
coming in between each entry
but i have done like this way
egrep -A1 "PUN/"  filename | grep  "mail:"
 
output come perfectly
 
thanks all for solving the issue  so quickly


--- On Wed, 17/12/08, Nadeem M. Khan <[email protected]> wrote:

From: Nadeem M. Khan <[email protected]>
Subject: Re: [LinuxVadaPav] advanced search script required
To: [email protected]
Date: Wednesday, 17 December, 2008, 7:10 PM






On Wed, Dec 17, 2008 at 5:35 PM, ashok abraham <ashok...@yahoo. com> wrote:
> with egrep also iam getting both the lines
>
>
> cn: PUN/PROJ/RAJENDRA TEKADE
> mail: rajendra.tekade@ shapoorji. com
> --
> cn: PUN/PROJ/KIRAN PANDHE
> mail: kiran.pandhe@ shapoorji. com

Haven't tested this, but you could pipe it to grep -v like this:

egrep -AN PUN filename | grep -v PUN

Let us know if it works.

Regards,
NMK.
 














      Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/

[Non-text portions of this message have been removed]

Reply via email to