[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] deallocation of brace expanded variable

From: Greg Wooledge
Subject: Re: [Help-bash] deallocation of brace expanded variable
Date: Thu, 11 Sep 2014 11:50:00 -0400
User-agent: Mutt/

On Thu, Sep 11, 2014 at 04:49:58PM +0200, Sebastian Eiser wrote:
> for i in {1..10000000}; do echo -n; done

Chet has already addressed the question from his point of view, but here
is how this code should have been written:

for ((i=1; i<=10000000; i++)); do :; done

Don't waste memory by generating several hundred megabytes of string data
in the first place.  It's not necessary.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]