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: Roman Rakus
Subject: Re: [Help-bash] procps output truncated due to bash setting $COLUMNS
Date: Tue, 08 Jan 2013 18:04:35 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 01/08/2013 05:57 PM, Jan Engelhardt wrote:

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.

On my box it isn't:
$ bash
$ echo $LINES
25
$ env | grep LINES
$ exit

Using Fedora linux.

RR



reply via email to

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