On Monday, July 22, 2002, at 02:38 , kent ho wrote:

> Thanks,
>
> Kent

I will admit that I pulled out my copy of the
O'Reilly "Sed and Awk" - which I would recommend
if you are going to be in that space long.

Alternatively, you might look into perl

        open(IN, "$file") or "die unable to open $file for input: $!\n";
        open(OUT, "> $outfile) or die ....

        while(<IN>) {
                last if /$MONTH/;
                print OUT $_;
        }

        close(IN);
        close(OUT);

Since the odds are reasonably high, that if you
have arrived at a place where you need to pass
variables into sed scripts in a shell script
that you are rushing into a level of complexity
where being able to do the rest of the work
will become easier to maintain in perl.



ciao
drieux

http://www.wetware.com/drieux/pbl/

--------------

This space left intentionally blank.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to