For Programmers: Free Programming Magazines  


Home > Archive > AWK > February 2005 > dealing with GZIPed files









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author dealing with GZIPed files
aaronm@europeanwatch.com

2005-02-11, 8:55 am

Here's what I want to do: take a file in a compressed format(gzip or
bzip2) and process it awk. I know I can do this easily in a shell
script wrapper, zcat $1 | awk....
but I was wondering if there is a way to process compressed files
natively in Awk.
Aaron

Ian Stirling

2005-02-11, 8:55 pm

aaronm@europeanwatch.com <aaronm@europeanwatch.com> wrote:
> Here's what I want to do: take a file in a compressed format(gzip or
> bzip2) and process it awk. I know I can do this easily in a shell
> script wrapper, zcat $1 | awk....
> but I was wondering if there is a way to process compressed files
> natively in Awk.


You could implement the decompressor in awk.
You'd have to be barkingmad of course.

Slightly less natively,
"bzip -d /tmp/tmp.bz" |getline
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com