From: Bernd Eggink <eggink@rrz.uni-hamburg.de>
To: Bruce Stephens <B.Stephens@isode.com>
Cc: zsh-users@math.gatech.edu
Subject: Re: for-command problem
Date: Mon, 03 Nov 1997 23:21:36 +0100 [thread overview]
Message-ID: <345E4E6F.7ACB1F6A@rrz.uni-hamburg.de> (raw)
In-Reply-To: <199711031720.MAA27902@math.gatech.edu>
Bruce Stephens wrote:
>
> agn@uitesa.es said:
> > for ((let n=1; $n < 12 ; let n=$n+1))
> > do
> > echo $n
> > done
>
> This works:
>
> for ((n=1; $n<12; n=$n+1))
> do
> echo $n
> done
The $ is not necessary, since the expressions are evaluated as
arithmetic expressions. Thus:
for (( n = 1; n < 12; ++n ))
do ...
done
--
Bernd Eggink
Regionales Rechenzentrum der Universitaet Hamburg
eggink@rrz.uni-hamburg.de
http://www.rrz.uni-hamburg.de/eggink/BEggink.html
prev parent reply other threads:[~1997-11-03 22:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-11-03 15:14 Andres Gomez Navarro
1997-11-03 15:56 ` Bruce Stephens
1997-11-03 22:21 ` Bernd Eggink [this message]
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=345E4E6F.7ACB1F6A@rrz.uni-hamburg.de \
--to=eggink@rrz.uni-hamburg.de \
--cc=B.Stephens@isode.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).