This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Limit for bash variable ?
- From: "Mark J. Reed" <markjreed at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 2 Nov 2009 21:26:24 -0500
- Subject: Re: Limit for bash variable ?
- References: <4AEF544B.8000604@free.fr>
On Mon, Nov 2, 2009 at 4:51 PM, cuicui wrote:
> Hello,
>
> I need to store some long strings in a bash variable, I'd like to know if there's a limit in length (last version of bash/cygwin 1.5).
>
> At the moment the string is 3.185 chars long. It's a temporary situation until I figure something better out.
There is no limit in bash or Cygwin, as far as I know (just
successfully tested up to 13,598,720 bytes in 1.7). However, if you
export the variable to the environment and expect it to be visible to
a Windows program using GetEnvironmentVariable(), then there is (or at
least used to be) a hard length limit of 32,766 characters (32,767
including the trailing NUL).
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple