On Mon, Mar 20, 2017 at 10:17 AM, Noilson Caio <caiog...@gmail.com> wrote:
> Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu' > -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' > -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -D_GNU_SOURCE > -DRECYCLES_PIDS -DDEFAULT_PATH_VALUE='/usr/local/bin:/usr/bin' -O2 -g > -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong > --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic > uname output: Linux SPFBL-POC-CENTOS-7 3.10.0-514.2.2.el7.x86_64 #1 SMP > Tue Dec 6 23:06:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux > Machine Type: x86_64-redhat-linux-gnu > > Bash Version: 4.2 > Patch Level: 46 > Release Status: release > > Description: > Hello bash crew. > My name is Noilson Caio and i assume that there is something weird/strange > in bash. I'm working with huge folder structures and a lot of files every > day and the best way to describe the 'problem' is using a example. > > Example task: Build a folder structure using 0-9 at 2 levels > Something like that: > I understand your problem. But what do you want BASH to do about it? BASH is a generalized command processor. You have found that it is possible to give a "reasonable" command which exhausts your available memory. No offense intended, but _I_ would consider that a "user error". It is no different from what I saw on another forum for the R language. The user exhausted memory by trying to read in a CSV file, the entire thing at once, which was about 1 million lines (rows) containing hundreds of values per row. Solution: buy a more powerful computer with, say, about 512 GiB of memory. It'll only set you back about $2,000 U.S.; example (not recommendation): http://www.thinkmate.com/system/rax-xs4-1160v4. Honestly: you need to change your algorithm for processing your problem. In your example, perhaps a series of nested loops. -- "Irrigation of the land with seawater desalinated by fusion power is ancient. It's called 'rain'." -- Michael McClary, in alt.fusion Maranatha! <>< John McKown