Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 1
    According to the ksh documentation you cannot count on the values examined here; it depends on the actual implementation on the system. (See my answer.) Commented Apr 9, 2015 at 8:07
  • @Janis Indeed, thanks. Answer updated to state this is implementation/configuration dependent. Commented Apr 9, 2015 at 9:06
  • @jlliagre suppose a string "ABCDEFGH" where each character is of 1 bytes then can i assume for ksh 93 and bash 4.2 array maximum capacity is 4194303 characters. Commented Apr 9, 2015 at 10:47
  • 1
    As I wrote, there is no hard-coded maximum capacity for bash. In any case, do you really need more than four millions element in a shell script array? Looks like you might be picking the wrong tool for the job. Commented Apr 9, 2015 at 10:59
  • @jlliagre I got the concept :) Commented Apr 9, 2015 at 12:47