Liste des Groupes | Revenir à cu shell |
On 18/06/2024 at 15:38, Janis Papanagnou wrote:[...]
One thing that concerns me with arrays is that I seem to recall that
there was a limit in the number of array elements (which might be an
issue on lengthy lists of files). But some ad hoc tests seem to show
that if there's a limit it's not any more in the 1k/4k elements range
as it had been. (Bolski/Korn says their arrays support at least 4k.)
I tested in ksh - works as written.
From here:
https://unix.stackexchange.com/questions/195191/ksh-bash-maximum-size-of-an-array
<quote>
This simple script shows on my systems (Gnu/Linux and Solaris):
ksh88 limits the size to 2^12-1 (4095). (subscript out of range ).
Some older releases like the one on HP-UX limit the size to 1023.
ksh93 limits the size of a array to 2^22-1 (4194303), your mileage
may vary.
bash doesn't look to impose any hard-coded limit outside the one
dictated by the underlying memory resources available. For example bash
uses 1.3 GB of virtual memory for an array size of 18074340.
</quote>
Les messages affichés proviennent d'usenet.