bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] Output to gz file


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

On Mon, Feb 6, 2012 at 5:35 PM, Peng Yu <address@hidden> wrote:
> 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!

OK. I didn't notice the description on the same page. Now the problem is solved.

print items | command

-- 
Regards,
Peng



reply via email to

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