bug-bash
[Top][All Lists]
Advanced

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

Re: big 'list' consumes all memory


From: pk
Subject: Re: big 'list' consumes all memory
Date: Thu, 16 Apr 2009 16:32:29 +0200

On Thursday 16 April 2009 11:11, Mart Frauenlob wrote:

> for i in $(seq 0 15755500); do echo $i; done
> -bash: xrealloc: ../bash/subst.c:512: cannot reallocate 182209024 bytes
> (0 bytes allocated)
> 
> 
> ok, thesis looks confirmed...
> I'm no C programmer, but I try to think logically about it.
> There may be no way around it, as it may be necessary to build the
> complete list, before it's possible to work with it.

If you do it that way maybe yes (or maybe not - I can't really speak), but
of course you can always do

seq 1 15755500 | while read i; etc.



reply via email to

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