Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: lssum - summing up sizes of files
- X-seq: zsh-users 1606
- From: Sven Guckes <guckes@xxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: lssum - summing up sizes of files
- Date: Sat, 13 Jun 1998 21:12:33 +0200
- Cc: schaefer@xxxxxxxxxxxxxxxx
- In-reply-to: <980613100641.ZM27081@xxxxxxxxxxxxxxxxxxxxxxx>; from Bart Schaefer on Sat, Jun 13, 1998 at 10:06:41AM -0700
- Mail-followup-to: zsh-users@xxxxxxxxxxxxxxx, schaefer@xxxxxxxxxxxxxxxx
- References: <19980613181013.A4302@xxxxxxxxxxxxxxxxx> <980613100641.ZM27081@xxxxxxxxxxxxxxxxxxxxxxx>
Quoting Bart Schaefer (schaefer@xxxxxxxxxxxxxxxx):
> In 3.0, there's no direct way to read the size of the file into the shell.
> You'd have to run "ls" and parse the output, or something.
I see. Too bad.
And I keep wondering why "gls" doesn't aloow to "sum file sizes".
Doesn't everybody need this kind of thing every day?
> in 3.1.4 with the "stat" module loaded, you can do it with
> sumsizes() {
> local sum sizes i
> stat -A sizes +size $*
> sum=0; for i in $sizes; ((sum += i))
> print sum
> }
>
> E.g.
> sumsizes **/*.o
Looks cool! We have zsh-3.1.2 here - will that version work?
Or is are "modules" a new feature of zsh-3.1.4?
How do you "load" those modules, anyway?
> The manual is woefully short of examples; it's
> almost exclusively limited to descriptive text.
Indeed - the manuals need more examples.
Is there a good reason for not including them?
(Other than "minimal size"?)
Sven
Messages sorted by:
Reverse Date,
Date,
Thread,
Author