[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] procps output truncated due to bash setting $COLUMNS
From: |
Jan Engelhardt |
Subject: |
Re: [Help-bash] procps output truncated due to bash setting $COLUMNS |
Date: |
Tue, 8 Jan 2013 17:57:55 +0100 (CET) |
User-agent: |
Alpine 2.01 (LNX 1266 2009-07-14) |
On Tuesday 2013-01-01 12:20, Pierre Gaston wrote:
>> The question here is: should bash not set $COLUMNS, or should ps
>> ignore $COLUMNS if not outputting to a tty, or something else?
>
>Bash sets COLUMNS when interactive, but it does not export it so it
>should not interfere with other tools unless it is exported in one of
>your startup files.
Hrrrm.
17:57 nakamura:~ > unset LINES COLUMNS
17:57 nakamura:~ > perl -le 'print $ENV{COLUMNS}'
17:57 nakamura:~ > bash --noprofile --norc
bash-4.2$ perl -le 'print $ENV{COLUMNS}'
80
It would seem it exports it by default.