bash on solaris: "export LINES=27" doesn't change LINES

bash on solaris: "export LINES=27" doesn't change LINES

Post by Fred M » Tue, 04 May 2004 06:15:06



I'm not able to set my environment variable LINES in bash 2.030(1)
running on sparc solaris 8.  This is regardless of whether I try this
from an xterm running on twm, or whether I ssh to the sun box from
cygwin.  I can set it fine using bash 2.05b.0(1) running on cygwin
1.5.9-1.

   bash 2.030(1), solaris 8
   ------------------------
   > export LINES=50
   > echo $LINES
   24
   > export LINES=50 ; echo $LINES
   50
   > echo $LINES
   24

   bash 2.05b.0(1), cygwin 1.5.9-1.
   --------------------------------
   > export LINES=50
   > echo $LINES
   50
   > export LINES=55 ; echo $LINES
   55
   > echo $LINES
   55

I am not changing the window size within those set of commands.

Thanks for any suggestions on the cause of this "noncompliance", and
maybe any workaround.

Fred
--
Fred Ma
Dept. of Electronics, Carleton University
1125 Colonel By Drive, Ottawa, Ontario
Canada, K1S 5B6

 
 
 

bash on solaris: "export LINES=27" doesn't change LINES

Post by Alan Burliso » Tue, 04 May 2004 07:45:04



> I'm not able to set my environment variable LINES in bash 2.030(1)
> running on sparc solaris 8.  This is regardless of whether I try this
> from an xterm running on twm, or whether I ssh to the sun box from
> cygwin.  I can set it fine using bash 2.05b.0(1) running on cygwin
> 1.5.9-1.

>    bash 2.030(1), solaris 8
>    ------------------------
>    > export LINES=50
>    > echo $LINES
>    24
>    > export LINES=50 ; echo $LINES
>    50
>    > echo $LINES
>    24

>    bash 2.05b.0(1), cygwin 1.5.9-1.
>    --------------------------------
>    > export LINES=50
>    > echo $LINES
>    50
>    > export LINES=55 ; echo $LINES
>    55
>    > echo $LINES
>    55

> I am not changing the window size within those set of commands.

> Thanks for any suggestions on the cause of this "noncompliance", and
> maybe any workaround.

$ man bash

      LINES
           Used by the select builtin  command  to  determine  the
           column  length for printing selection lists.  Automati-
           cally set upon receipt of a SIGWINCH.

 
 
 

bash on solaris: "export LINES=27" doesn't change LINES

Post by Fred M » Tue, 04 May 2004 14:55:09




> > I'm not able to set my environment variable LINES in bash 2.030(1)
> > running on sparc solaris 8.  This is regardless of whether I try this
> > from an xterm running on twm, or whether I ssh to the sun box from
> > cygwin.  I can set it fine using bash 2.05b.0(1) running on cygwin
> > 1.5.9-1.

<...SNIP...>

Quote:

> > I am not changing the window size within those set of commands.

> $ man bash

>       LINES
>            Used by the select builtin  command  to  determine  the
>            column  length for printing selection lists.  Automati-
>            cally set upon receipt of a SIGWINCH.

Yes, that's one of the first things I checked.  But I didn't change the
window size after trying to set LINES.  However, after your response, I
looked closer and there is a shell option (shopt) checkwinsize that
causes bash to check the window size after each command to see if LINES
needs updating.  However, it isn't set:

   > shopt -p checkwinsize
   shopt -u checkwinsize

Fred

P.S. Strangely, the variable LINES is explained in the man page for
bash 2.05b.0(1) on cygwin, but not bash 2.030(1) on solaris (though it
is mentioned in the context of checkwinsize).
--
Fred Ma
Dept. of Electronics, Carleton University
1125 Colonel By Drive, Ottawa, Ontario
Canada, K1S 5B6

 
 
 

bash on solaris: "export LINES=27" doesn't change LINES

Post by tbut.. » Fri, 07 May 2004 11:35:58



> Yes, that's one of the first things I checked.  But I didn't change the
> window size after trying to set LINES.  However, after your response, I
> looked closer and there is a shell option (shopt) checkwinsize that

perhaps running truss and/or pargs against the shell process (from
another window/shell) would shed some light.

tim

 
 
 

bash on solaris: "export LINES=27" doesn't change LINES

Post by Stephane CHAZELA » Fri, 07 May 2004 21:35:45


2004-05-2, 21:15(+00), Fred Ma:
Quote:> I'm not able to set my environment variable LINES in bash 2.030(1)
> running on sparc solaris 8.  This is regardless of whether I try this
> from an xterm running on twm, or whether I ssh to the sun box from
> cygwin.  I can set it fine using bash 2.05b.0(1) running on cygwin
> 1.5.9-1.

>    bash 2.030(1), solaris 8
>    ------------------------
>    > export LINES=50
>    > echo $LINES
>    24
>    > export LINES=50 ; echo $LINES
>    50
>    > echo $LINES
>    24

[...]

Try: stty rows 50

bash gets the number of lines from the terminal.

--
Stphane

 
 
 

bash on solaris: "export LINES=27" doesn't change LINES

Post by fred » Sun, 09 May 2004 13:07:53



> 2004-05-2, 21:15(+00), Fred Ma:
> > I'm not able to set my environment variable LINES in bash 2.030(1)
> > running on sparc solaris 8.  This is regardless of whether I try this
> > from an xterm running on twm, or whether I ssh to the sun box from
> > cygwin.  I can set it fine using bash 2.05b.0(1) running on cygwin
> > 1.5.9-1.

> Try: stty rows 50

> bash gets the number of lines from the terminal.

Thanks, Stephane.  Works like a charm.  Funny that LINES resists
being changed, since "man bash" says it's updated continuously
only if checkwinsize is set.  But it works.

Fred

 
 
 

1. bash on solaris: "export LINES=27" doesn't change LINES

I'm not able to set my environment variable LINES in bash 2.030(1)
running on sparc solaris 8.  This is regardless of whether I try this
from an xterm running on twm, or whether I ssh to the sun box from
cygwin.  I can set it fine using bash 2.05b.0(1) running on cygwin
1.5.9-1.

   bash 2.030(1), solaris 8
   ------------------------
   > export LINES=50
   > echo $LINES
   24
   > export LINES=50 ; echo $LINES
   50
   > echo $LINES
   24

   bash 2.05b.0(1), cygwin 1.5.9-1.
   --------------------------------
   > export LINES=50
   > echo $LINES
   50
   > export LINES=55 ; echo $LINES
   55
   > echo $LINES
   55

I am not changing the window size within those set of commands.

Thanks for any suggestions on the cause of this "noncompliance", and
maybe any workaround.

Fred
--
Fred Ma
Dept. of Electronics, Carleton University
1125 Colonel By Drive, Ottawa, Ontario
Canada, K1S 5B6

2. completely portable line numbering?

3. "Box", "line drawing", "special graphics" characters in aixterm

4. k8d master f

5. awk '{gsub("old","\n"); print}' adds additional new line

6. Help: root passwd not accepted

7. Why doesn't echo "text" 'command' "more text" work?

8. RedHat 5.1 on the Thinkpad 701c

9. replacing characters at column "x" every "n'th" line

10. "for" and line by line

11. """"""""My SoundBlast 16 pnp isn't up yet""""""""""""

12. "carriage return" and "line feed" encoding