From: Sweth Chandramouli <sweth@astaroth.nit.gwu.edu>
To: Andrew Main <zefram@tao.co.uk>
Cc: Timothy J Luoma <luomat+zsh+users@luomat.peak.org>,
zsh-users@math.gatech.edu
Subject: Re: I've forgotten again how to do this --> 0-100
Date: Thu, 15 Jan 1998 15:32:21 -0500 [thread overview]
Message-ID: <19980115153221.55822@astaroth.nit.gwu.edu> (raw)
In-Reply-To: <199801151028.KAA21473@taos.demon.co.uk>; from Andrew Main on Thu, Jan 15, 1998 at 10:28:37AM +0000
On Thu, Jan 15, 1998 at 10:28:37AM +0000, Andrew Main wrote:
> Timothy J Luoma wrote:
> >for i in 0-100; do
> > echo $i
> >done
>
> for ((i=0;i<=100;i++)); do
> echo $i
> done
>
> takes less memory than the brace expansion method.
how does it compare (memory-wise) to the following:
while (( $i < 101 )); do
echo $i
i=$((i+1))
done
(the brace expansion method makes the most sense to me, intuitively, followed by
the version i used above; the syntax of your for statement, however, always
confuses me.)
--
"Countin' on a remedy I've counted on before
Goin' with a cure that's never failed me
What you call the disease
I call the remedy" -- The Mighty Mighty Bosstones
next prev parent reply other threads:[~1998-01-15 20:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-01-15 0:12 Timothy J Luoma
1998-01-15 0:46 ` Danek Duvall
1998-01-15 1:03 ` Mirar
1998-01-15 10:28 ` Andrew Main
1998-01-15 15:01 ` Geoff Wing
1998-01-15 17:39 ` Brandon C. George
1998-01-15 17:51 ` Andrew Main
1998-01-15 20:32 ` Sweth Chandramouli [this message]
1998-01-15 22:59 ` Geoff Wing
1998-01-21 16:26 ` loops and all that Sven Guckes
1998-01-22 3:54 ` related question Sweth Chandramouli
1998-01-22 9:24 ` Bernd Eggink
1998-01-22 13:00 ` Mirar
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=19980115153221.55822@astaroth.nit.gwu.edu \
--to=sweth@astaroth.nit.gwu.edu \
--cc=luomat+zsh+users@luomat.peak.org \
--cc=zefram@tao.co.uk \
--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).