Extract block of text



Hi

I would like to extract the first block of data in a file. Input
example with 2 blocks:

This is the begining
-------
some text1
some text2
This is the beggining
-------
some text1
some text2

In this example the line count of each "input block" is 4. But the
size can be different. It's dynamic. The blocks are similar.

Is It better to do it with shell, sed or awk?

Thanks

João Rei
.



Relevant Pages

  • Re: Extract block of text
    ... I would like to extract the first block of data in a file. ... some text1 ... some text2 ... Don't use shell for text processing, and only use sed for simple substitutions. ...
    (comp.unix.shell)
  • Re: Search for sepcific words and delete rows between them
    ... Will "text1" ALWAYS appear at a lower row number than "text2"? ... Public Sub Auto_DeleteRows ...
    (microsoft.public.excel.programming)
  • Re: Extract block of text
    ... This is the begining ... some text1 ... some text2 ... Don't use shell for text processing, and only use sed for simple substitutions. ...
    (comp.unix.shell)
  • Odd behavior of the Rich Text Box
    ... anyone out here familiar with a problem I am having with tis Rich Text Box. ... Also on the form is a regular text1 box with ... RTB multiline=true and scrollbars=both ... text2 scrollbars=horizontal, multiline=false ...
    (microsoft.public.vb.controls)
  • Re: Copy part of data base

    (microsoft.public.excel)