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.