| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS |
| X-Spam-Check-By: | sourceware.org |
| MIME-Version: | 1.0 |
| In-Reply-To: | <4AEF544B.8000604@free.fr> |
| References: | <4AEF544B DOT 8000604 AT free DOT fr> |
| Date: | Mon, 2 Nov 2009 21:26:24 -0500 |
| Message-ID: | <f60fe000911021826y175d62a3tf03bacbdc9697d5e@mail.gmail.com> |
| Subject: | Re: Limit for bash variable ? |
| From: | "Mark J. Reed" <markjreed AT gmail DOT com> |
| To: | cygwin AT cygwin DOT com |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |