Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Stephano Mariani" To: "'Randall R Schulz'" , "'Scott Prive'" Cc: Subject: RE: "LINES" environment variable Date: Mon, 11 Feb 2002 19:52:52 -0000 Message-ID: <026901c1b335$b1668890$01000001@sknet01> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 1 (Highest) X-MSMail-Priority: High X-Mailer: Microsoft Outlook, Build 10.0.2616 In-Reply-To: <5.1.0.14.2.20020211112643.024f5a10@pop3.cris.com> Importance: High X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 [...] This setting / altering of LINES does not appear to happen when BASH is invoked as /bin/sh.exe, so that suggests one work-around [...] When /bin/sh is invioked, bash does not appear to be running, on my system, this is ash. Of course I can find a workaround (and I have), I merely want to discover why this behaviour occurs. I will investigate in detail when I have more time. Stephano Mariani -----Original Message----- From: Randall R Schulz [mailto:rrschulz AT cris DOT com] Sent: Monday, 11 February 2002 7 39 To: Stephano Mariani; 'Scott Prive' Cc: cygwin AT cygwin DOT com Subject: RE: "LINES" environment variable Importance: High Stephano, The result of these commands ... % strings /bin/bash.exe |egrep LINES and % strings /bin/bash.exe |less [ type "/LINES" to search for "LINES" ] ... show three occurrences of LINES built into BASH and "less" lets you see that each of these occurs in conjunction with the string COLUMNS. So, my guess is that BASH is injecting these into the variable mix (but not as exported environment variables) based on what the tty driver reports as the terminal window dimensions. From what you say, the fact that LINES is already set in the environment when the shell is invoked does not deter BASH from (re-) setting those variables. This setting / altering of LINES does not appear to happen when BASH is invoked as /bin/sh.exe, so that suggests one work-around. Otherwise, just set the variable manually in whatever script you're running or supply the value as an argument, possibly via an -option. You could always just choose a different name, too... Randall Schulz Mountain View, CA USA At 11:15 2002-02-11, Stephano Mariani wrote: >I have tried everything, but some hard-coded value must exist. The only >way it seems to work is when I explicitly execute an export. I can do this >using bash easily, but what about ash (/bin/sh) or any other cygwin >program (perhaps ones started outside of bash). > >TIA >Stephano Mariani > >-----Original Message----- >From: Scott Prive [mailto:Scott DOT Prive AT storigen DOT com] >Sent: Monday, 11 February 2002 2 54 >To: Stephano Mariani >Subject: RE: "LINES" environment variable > >I'm curious as to why Cygwin isn't pickup your NT environment variable, >but you can export this variable from your ~/.bash_profile (if you don't >mind it being picked up for everything you might run from the shell). > > >-----Original Message----- >From: Stephano Mariani [mailto:sk DOT mail AT btinternet DOT com] >Sent: Thursday, February 07, 2002 6:39 PM >To: cygwin AT cygwin DOT com >Subject: "LINES" environment variable >Importance: High > >Where can I override the LINES environment variable? I need to run some >programs that use this value to determine the display characteristics. > >I have set it to 50 in the system environment in windows, but echo $LINES >says 25. > >Stephano Mariani -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/