[sf-lug] dpkg -l & width ...
Michael Paoli
Michael.Paoli at cal.berkeley.edu
Wed Aug 2 20:53:38 PDT 2017
> From: "Rick Moen" <rick at linuxmafia.com>
> Subject: Re: [sf-lug] dpkg -l & width ...
> Date: Wed, 2 Aug 2017 20:36:11 -0700
> Quoting Michael Paoli (Michael.Paoli at cal.berkeley.edu):
>
>> Yes, that shows it as a shell named parameter ("variable").
>> But is it in (exported to) the environment?
>>
>> $ env | grep '^COLUMNS='
>> gives ... what?
>
> null. FWIW.
>
> {shrug}
Yes, ... so set - as shell named parameter ("variable"), but
not exported into the environment.
So, hence, dpkg would know nothing of it ... unless one did
something like:
$ COLUMNS="$COLUMNS" dpkg -l | cat
$ (export COLUMNS; dpkg -l | cat)
etc.
(if we don't make stdout a non-tty device, dpkg -l will generally
figure out width from ioctl call(s) on the file descriptor 1 (stdout)
isatty(3) device)
More information about the sf-lug
mailing list