From: Sven Guckes <guckes@math.fu-berlin.de>
To: zsh-users@math.gatech.edu
Cc: schaefer@brasslantern.com
Subject: Re: lssum - summing up sizes of files
Date: Sat, 13 Jun 1998 21:12:33 +0200 [thread overview]
Message-ID: <19980613211233.A5224@math.fu-berlin.de> (raw)
In-Reply-To: <980613100641.ZM27081@candle.brasslantern.com>; from Bart Schaefer on Sat, Jun 13, 1998 at 10:06:41AM -0700
Quoting Bart Schaefer (schaefer@brasslantern.com):
> 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
next prev parent reply other threads:[~1998-06-13 19:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-06-13 16:10 Sven Guckes
1998-06-13 17:06 ` Bart Schaefer
1998-06-13 19:12 ` Sven Guckes [this message]
1998-06-13 19:33 ` adding examples to man pages Richard Coleman
1998-06-13 19:38 ` lssum - summing up sizes of files Danek Duvall
1998-06-13 21:56 ` Sven Guckes
1998-06-14 0:20 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19980613211233.A5224@math.fu-berlin.de \
--to=guckes@math.fu-berlin.de \
--cc=schaefer@brasslantern.com \
--cc=zsh-users@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).