"LINES" environment variable
Randall R Schulz
rrschulz@cris.com
Mon Feb 11 11:39:00 GMT 2002
Stephano,
The result of these commands ...
% strings /bin/bash.exe |egrep LINES
and
% strings /bin/bash.exe |less
[ type "/LINES<RETURN>" 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.Prive@storigen.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.mail@btinternet.com]
>Sent: Thursday, February 07, 2002 6:39 PM
>To: cygwin@cygwin.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/
More information about the Cygwin
mailing list