New option for "dpkg -l" ?
Several days ago (in the debian-user mailing-list), there was a discussion
about 'dpk -l' command which truncate package name if the command is
followed by a pipe. A solution proposed was to export environment variable
'COLUMNS' to a number greater than 100.
> COLUMNS=120 dpkg -l > /tmp/packages
I used this solution since a long time into scripts and proposed this
solution to firstname.lastname@example.org for his documentation where he speaks about this
problem (APT-HOWTO - section "4.2 Using dpkg to find package names")
But I don't think it is a good solution. Simply because a good value of
COLUMNS does not exists. That's why i propose to add an option at 'dpkg'
command ('--no-format' for example). This option will indicate to dpkg that
we don't want a formatted output (the first 1/4 for the name, the second
1/4 for the version and the last for the description). Indeed when you use
'dpkg -l' into a script, you don't need cosmetic presentation. You only
want to get the right informations. So to keep the compatibility (the same
information in the same column), the output of 'dpkg -l --no-format' should
be like this:
xx <name><space(s) or tabulation><version><space(s) or
Hope that my first contribution for the Debian Distribution will be
PS: I'm not a member of this list so please send your answers to