grep -i begin -A4  <FILENAME>

if you do not have spaces before text in the file, you might as well use
grep -i ^begin -A4 <FILENAME>


thanks
gourav

On Thu, Dec 10, 2009 at 6:45 PM, Karthikeyan S <[email protected]> wrote:

> Hi,
>
>      I have a file which has some contents in the pattern as shown below
>
>           <File contents >
>
>            BEGIN: Mon Nov 30 00:06:03 2009
>            -----------------------------------------------------
>                  Running Count: 1
>                  Locked Count: 9
>                  Sending Count: 0
>
>
>             Some contents XXXXXXXXXXX
>              XXXXXXXXXXXXXXXXX
>               XXXXXXXXXXXXXXXX
>
>            BEGIN: Mon Nov 30 00:10:03 2009
>            -----------------------------------------------------
>                  Running Count: 1
>                  Locked Count: 10
>                  Sending Count: 0
>
>               Some contents XXXXXXXXXXX
>              XXXXXXXXXXXXXXXXX
>               XXXXXXXXXXXXXXXX
>
>          </File contents>
>
>
> I need a command to grep the four lines starting with Begin to sending
> count
> and paste in different file. How can i acheive this
> _______________________________________________
> To unsubscribe, email [email protected] with
> &quot;unsubscribe &lt;password&gt; &lt;address&gt;&quot;
> in the subject or body of the message.
> http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
>
_______________________________________________
To unsubscribe, email [email protected] with 
&quot;unsubscribe &lt;password&gt; &lt;address&gt;&quot;
in the subject or body of the message.
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to