Date: Thu, 15 Nov 2018 12:09:46 -0600 From: Eric Blake <ebl...@redhat.com> Message-ID: <8491692f-8d4a-f24f-2744-2de3465a9...@redhat.com>
| On 11/15/18 12:00 PM, RAL wrote: | > How is defined the maximum number of characters a variable name can have? | | Bash has no hardcoded limit, thus your maximum is dependent on how much | free memory your system has. I maintain the NetBSD sh (an ash derivative) - as part of that I have a test that (amongst other things) tests long var names - it tests up to about 1000 chars (including adding one extra char (or deleting the last) and verifying that different vars result) - I have run that test against bash with no problems at all. I can't see any reason that much longer names would not work - given that you understand that anything using them is not likely to run all that fast (and will consume more memory than you'd expect probably). kre