help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] procps output truncated due to bash setting $COLUMNS


From: Chet Ramey
Subject: Re: [Help-bash] procps output truncated due to bash setting $COLUMNS
Date: Tue, 08 Jan 2013 15:52:32 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 1/8/13 1:34 PM, Steven W. Orr wrote:

> env - bash --noprofile --norc
> 
> but that doesn't work for me either. I still get them set but they are
> *not* environment variables. They are just locals. Same result with or
> without the env -.
> 
> 502 > env - bash --noprofile --norc
> bash-4.2$ env | egrep 'LINES|COLUMNS'
> *bash-4.2$ set | egrep 'LINES|COLUMNS'
> COLUMNS=80
> LINES=24
> bash-4.2$ perl -le 'print $ENV{COLUMNS}'
> 
> bash-4.2$
> 
> 
> I do see this in the man pages:
> 
> 
>        COLUMNS
>               Used by the select compound command to  determine  the  terminal
>               width  when  printing  selection  lists.  Automatically set upon
>               receipt of a SIGWINCH.
> 
>        LINES  Used by the select compound  command  to  determine  the  column
>               length  for  printing  selection  lists.  Automatically set upon
>               receipt of a SIGWINCH.

If your startup files -- and some vendors have enabled /etc/bash.bashrc or
equivalent, which is not disabled by --norc -- set the `checkwinsize'
option, or your vendor has chosen to build bash with it enabled by default,
you will have LINES and COLUMNS set but not exported.  I will add the
interaction between checkwinsize and LINES/COLUMNS to the documentation.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]