bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gawk] Output to gz file


From: Peng Yu
Subject: [bug-gawk] Output to gz file
Date: Mon, 6 Feb 2012 17:35:32 -0600

Hi,

The '>' in awk only output to plain text file. But I need the output be gzipped.

The following example is from the manual. I'm wondering if there is a
way to somehow pipe the results to gzip then gzip output to two files
phone-list.gz and name-list.gz. Of cause, I can always write the
uncompressed text file first then use gzip to zip them. But I don't
like the idea of creating intermediate files.

$ awk ’{ print $2 > "phone-list"
> print $1 > "name-list" }’ BBS-list

Does anybody know if there is a solution to my question? Thanks!

-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]