From owner-freebsd-questions@FreeBSD.ORG Tue Jan 2 18:48:15 2007 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 662EE16A407 for ; Tue, 2 Jan 2007 18:48:15 +0000 (UTC) (envelope-from kurt.buff@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.234]) by mx1.freebsd.org (Postfix) with ESMTP id BC07313C441 for ; Tue, 2 Jan 2007 18:48:14 +0000 (UTC) (envelope-from kurt.buff@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so5727646wxc for ; Tue, 02 Jan 2007 10:48:14 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Q8PexxXp/OZLXNhsYXd9ffRu6XnlOBO89c98yUZo1VDjz3GMTo/EShcktQIEorNbvEl0YzuJWABwpnf5XetfYwiJIUJsHl/6hLUww0yEFjP4jDu4aj/G6aXTv6BAciUq3wYKkhWjZ+6xGtdRJUKgis8jWVM4M45OqwQKM0z52nU= Received: by 10.70.84.6 with SMTP id h6mr37093910wxb.1167762009476; Tue, 02 Jan 2007 10:20:09 -0800 (PST) Received: by 10.70.131.11 with HTTP; Tue, 2 Jan 2007 10:20:08 -0800 (PST) Message-ID: Date: Tue, 2 Jan 2007 10:20:08 -0800 From: "Kurt Buff" To: questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: Batch file question - average size of file in directory X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 18:48:15 -0000 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 uncompressed files. How on earth would I go about doing that with the default shell (no bash or other shells installed), or in perl, or something like that. I'm no scripter of any great expertise, and am just stumbling over this trying to find an approach. Many thanks for any help, Kurt