On Wed, Dec 17, 2008 at 4:37 PM, Ashwin Muni <[email protected]> wrote:
> On Wed, Dec 17, 2008 at 5:36 PM, ashok abraham <[email protected]> wrote:
>
>> i have my entire organisation adress book details stored in ldap format
>> in a text file in the following manner

> You Can use the below command
>
> "grep stringtosearch (In your case mail:) filename"
>
> "grep mail: filename"
>
> --
> Ashwin R.


Guys, he wants to grep by region.

Ashwin, don't know what version of egrep you have, but you can give this a try:

egrep -AN PUN filename

Where N=Number of lines you want to display after the match is found.

You could also write a small perl script to do this, but that would be
an overkill.

Regards,
NMK.

Reply via email to