Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14826
| Path | csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Robert Elz <kre@munnari.OZ.AU> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: Maximum length of variable name |
| Date | Fri, 16 Nov 2018 08:49:39 +0700 |
| Lines | 23 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.4117.1542333013.1284.bug-bash@gnu.org> (permalink) |
| References | <8491692f-8d4a-f24f-2744-2de3465a9cfd@redhat.com> <7f63f0fe-61e2-4b39-bd00-3910dba190a8@googlegroups.com> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| X-Trace | usenet.stanford.edu 1542333014 22236 208.118.235.17 (16 Nov 2018 01:50:14 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | RAL <rodrigoalveslima@gmail.com>, bug-bash@gnu.org |
| Envelope-to | bug-bash@gnu.org |
| In-Reply-To | <8491692f-8d4a-f24f-2744-2de3465a9cfd@redhat.com> |
| X-detected-operating-system | by eggs.gnu.org: Genre and OS details not recognized. |
| X-Received-From | 2001:3c8:9009:181::2 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.21 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash/> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:14826 |
Show key headers only | View raw
Date: Thu, 15 Nov 2018 12:09:46 -0600
From: Eric Blake <eblake@redhat.com>
Message-ID: <8491692f-8d4a-f24f-2744-2de3465a9cfd@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
Back to gnu.bash.bug | Previous | Next — Previous in thread | Find similar | Unroll thread
Maximum length of variable name RAL <rodrigoalveslima@gmail.com> - 2018-11-15 10:00 -0800 Re: Maximum length of variable name Eric Blake <eblake@redhat.com> - 2018-11-15 12:09 -0600 Re: Maximum length of variable name Robert Elz <kre@munnari.OZ.AU> - 2018-11-16 08:49 +0700
csiph-web