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: Subject: Re: Limit for bash variable ? From: "Mark J. Reed" To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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