Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: I've forgotten again how to do this --> 0-100



Sweth Chandramouli <sweth@xxxxxxxxxxxxxxxxxxxx> typed:
: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))

let i++

:done
-- 
Geoff Wing [gcw@xxxxxxxxx]                         Phone    : +61-3-9818 2977
 Technical Manager: PrimeNet Computer Consultants  Facsimile: +61-3-9818 5155
 Work URL: http://www.primenet.com.au/             Mobile   : 0412 162 441
 Ego  URL: http://pobox.com/~gcw/



Messages sorted by: Reverse Date, Date, Thread, Author