Limit for bash variable ?

Mark J. Reed markjreed@gmail.com
Tue Nov 3 02:26:00 GMT 2009


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


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /