Matt Tilley writes:

> Also, there is probably a better group to post to, but a quick search for
> "script" in newsgroups didn't turn up anything that led me to believe that the
> question would be better directed to another group (if I'm wrong - please just
> point me in the right direction, I'll post there and sorry for the bother).

Try comp.unix.shell.

> BTW, I would like to use ksh for this (will look into other ways (such as
> perl) after I close my knowledge gap in places like this).

Sorry, I hate doing things like this in sh/ksh so much that I revert
back to Perl.

Here you go:

perl -0777 -ne 'print "$1\n\n" while(m/(^HCA.*(?:\nI[XY]\d{5}.*)+)/mg)' 
<your-file-name>


I hope you find this to be useful,

--kevin
-- 
Kevin D. Clark          |                           |  Will hack Perl for
[EMAIL PROTECTED] | kdcNOSPAM@.alumni.unh.edu | fine food, good beer, 
Cabletron Systems, Inc. | PGP Key Available         |      or fun.
Durham, N.H. (USA)      |                           |


**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to