Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: I've forgotten again how to do this --> 0-100
- X-seq: zsh-users 1234
- From: Sweth Chandramouli <sweth@xxxxxxxxxxxxxxxxxxxx>
- To: Andrew Main <zefram@xxxxxxxxx>
- Subject: Re: I've forgotten again how to do this --> 0-100
- Date: Thu, 15 Jan 1998 15:32:21 -0500
- Cc: Timothy J Luoma <luomat+zsh+users@xxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxxxxxxx
- In-reply-to: <199801151028.KAA21473@xxxxxxxxxxxxxxxx>; from Andrew Main on Thu, Jan 15, 1998 at 10:28:37AM +0000
- References: <199801150012.TAA07173@xxxxxxxxxxxxxxx> <199801151028.KAA21473@xxxxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author