Path: utzoo!attcan!uunet!samsung!usc!apple!uokmax!munnari.oz.au!metro!wolfen!hls0!george From: george@hls0.hls.oz (George Turczynski) Newsgroups: comp.unix.questions Subject: Re: What's wrong with this Bourne shell script? Summary: A better (?) way. Message-ID: <834@hls0.hls.oz> Date: 6 Aug 90 01:00:47 GMT References: <1990Aug3.193231.3166@silma.com> Lines: 22 In article <1990Aug3.193231.3166@silma.com>, aab@silma.com (Andy Burgess) writes: > ... > > While you're at it, is there a better way to get the total bytes > of the files in a directory? You could try something like this: ls -ld * | awk '{ sum+= $4 } END { print sum }' It does a similar thing to what your script is supposed to do. Hope this is of some interest to someone... George P. J. Turczynski. | ACSnet: george@highland.oz | Phone: 61 48 683490 Computer Systems Engineer. | Fax: 61 48 683474 |---------------------- Highland Logic Pty. Ltd. | I can't speak for the Suite 1, 348-354 Argyle Street | company, I can barely Moss Vale. NSW. 2577 Australia | speak for myself...