perl -ne 'print if /^CREATE\sTABLE/../^\)/;' < INFILE  > OUTFILE

On Mon, Oct 14, 2002 at 12:25:03PM -0400, iudicium ferat wrote:
> I am somewhat beating my head against a brick wall here - so I think "Hey!
> This sounds like a Fun With Perl project :)"
> 
> Here is the challenge -
> You are presented with a MySQL Schema dump that is less than 9 million
> rows; you should read the data row by row, finding each CREATE TABLE
> statement, and displaying the next ~50 lines INCLUDING this line - do
> this recursively until end of file is reached.
> [..] 
> Any helpful mumblings would be appreciated :)
> 
> Thx!
> -Bill-  :]
> _Sx____________________
>   ('>    iudicium ferat
>   //\   Have Computer -
>   v_/_    Will Hack...
> 
> 

-- 
cheers,
Ramki
-----------------------------------------------------------
Three virtues of programming: laziness,  impatience, hubris
Three virtues of community  : diligence, patience, humility
                              -- Larry Wall, Author of perl

Reply via email to