Re: Batch file question - average size of file in directory

2007-01-03 Thread Ian Smith
On Wed, 3 Jan 2007, Kurt Buff wrote: > On 1/3/07, Ian Smith <[EMAIL PROTECTED]> wrote: > > > From: James Long <[EMAIL PROTECTED]> > > > > From: "Kurt Buff" <[EMAIL PROTECTED]> [..] > > > > I've got a directory with a large number of gzipped files in it (over > > > > 110k) along with a f

Re: Batch file question - average size of file in directory

2007-01-03 Thread James Long
> Date: Thu, 4 Jan 2007 04:46:43 +1100 (EST) > From: Ian Smith <[EMAIL PROTECTED]> > Subject: Re: Batch file question - average size of file in directory > To: freebsd-questions@freebsd.org > Cc: James Long <[EMAIL PROTECTED]>, Kurt Buff <[EMAIL PROTECTED]> > M

Re: Batch file question - average size of file in directory

2007-01-03 Thread Giorgos Keramidas
On 2007-01-03 10:28, Kurt Buff <[EMAIL PROTECTED]> wrote: > I put together this one-liner after perusing 'man zcat': > > find /local/amavis/virusmails -name "*.gz" -print | xargs zcat -l >> out.txt > > It puts out multiple instances of stuff like this: > > compressed uncompr. ratio uncompressed

Re: Batch file question - average size of file in directory

2007-01-03 Thread Giorgos Keramidas
On 2007-01-03 10:42, Kurt Buff <[EMAIL PROTECTED]> wrote: > On 1/2/07, James Long <[EMAIL PROTECTED]> wrote: > > >Hi, Kurt. > > > >Can I make some assumptions that simplify things? No kinky filenames, > >just [a-zA-Z0-9.]. My approach specifically doesn't like colons or > >spaces, I bet. Also,

Re: Batch file question - average size of file in directory

2007-01-03 Thread Kurt Buff
On 1/2/07, Giorgos Keramidas <[EMAIL PROTECTED]> wrote: On 2007-01-02 10:20, Kurt Buff <[EMAIL PROTECTED]> wrote: You can probably use awk(1) or perl(1) to post-process the output of gzip(1). The gzip(1) utility, when run with the -cd options will uncompress the compressed files and send the unc

Re: Batch file question - average size of file in directory

2007-01-03 Thread Kurt Buff
On 1/3/07, Ian Smith <[EMAIL PROTECTED]> wrote: > Message: 17 > Date: Tue, 2 Jan 2007 19:50:01 -0800 > From: James Long <[EMAIL PROTECTED]> > > Message: 28 > > Date: Tue, 2 Jan 2007 10:20:08 -0800 > > From: "Kurt Buff" <[EMAIL PROTECTED]> > > I don't even have a clue how to start this on

Re: Batch file question - average size of file in directory

2007-01-03 Thread Kurt Buff
On 1/2/07, James Long <[EMAIL PROTECTED]> wrote: Hi, Kurt. Can I make some assumptions that simplify things? No kinky filenames, just [a-zA-Z0-9.]. My approach specifically doesn't like colons or spaces, I bet. Also, you say gzipped, so I'm assuming it's ONLY gzip, no bzip2, etc. Right, no

Re: Batch file question - average size of file in directory

2007-01-03 Thread Ian Smith
> Message: 17 > Date: Tue, 2 Jan 2007 19:50:01 -0800 > From: James Long <[EMAIL PROTECTED]> > > Message: 28 > > Date: Tue, 2 Jan 2007 10:20:08 -0800 > > From: "Kurt Buff" <[EMAIL PROTECTED]> > > I don't even have a clue how to start this one, so am looking for a little > > help. > > >

Re: Batch file question - average size of file in directory

2007-01-03 Thread Giorgos Keramidas
On 2007-01-02 10:20, Kurt Buff <[EMAIL PROTECTED]> wrote: > All, > > I don't even have a clue how to start this one, so am looking for a > little help. > > I've got a directory with a large number of gzipped files in it (over > 110k) along with a few thousand uncompressed files. > > I'd like to fin

Re: Batch file question - average size of file in directory

2007-01-02 Thread James Long
> Message: 28 > Date: Tue, 2 Jan 2007 10:20:08 -0800 > From: "Kurt Buff" <[EMAIL PROTECTED]> > Subject: Batch file question - average size of file in directory > To: [EMAIL PROTECTED] > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/pla

Batch file question - average size of file in directory

2007-01-02 Thread Kurt Buff
All, I don't even have a clue how to start this one, so am looking for a little help. I've got a directory with a large number of gzipped files in it (over 110k) along with a few thousand uncompressed files. I'd like to find the average uncompressed size of the gzipped files, and ignore the unc