dealing with GZIPed files

  • Follow


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

0
Reply aaronm 2/11/2005 4:36:15 AM

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
0
Reply Ian 2/11/2005 2:44:52 PM


1 Replies
158 Views

(page loaded in 0.048 seconds)

Similiar Articles:













6/29/2012 1:44:07 PM


Reply: