dpkg -l truncates package names

  • Follow


Hi;

I am on knoppix/debian.

I noticed that the command dpkg -l truncates the names of packages.

I put

COLUMNS=200
export COLUMNS

in my .bashrc

No effect.

Is there a way I can set things up to get dpkg to display the full 
package name?

Thanks in advance

Steve


-- 
Tired of Dick Cheney financing his nest egg with public funds?
Tired of John Ashcroft telling you to shut up?
Tired of George Bush sending your children to die while ignoring their 
funerals?
Tired of watching jobless economic "recoveries" for the rich while you 
are out of work?
If you are not working, why should George Bush get his get his job back?
Elect someone else in 2004

http://www.thousandreasons.org/listB.html

0
Reply ADDRESS_MUNGED_TO_PREVENT_SPAM_PLEASE_REPLY_TO_GRO (19) 1/1/2004 7:21:22 PM

Steve wrote:
> Hi;
> 
> I am on knoppix/debian.
> 
> I noticed that the command dpkg -l truncates the names of packages.
> 
> I put
> 
> COLUMNS=200
> export COLUMNS
> 
> in my .bashrc
> 

Make sure .bashrc does get executed and COLUMNS is set:
$ echo $COLUMNS

Also - dont do that.  Some things will probably break if you run at 200 
columns.  Better would be this:
$ COLUMNS=200 dpkg -l
(looks bad on my small res monitor)

Even better IMHO is to use dpkg-awk

$ dpkg-awk -- Package Version Section Installed-Size | awk '{
if ($0 == "")
	print $0;
else
	printf "%s ", $2;
}'

dpkg-awk is used in the following way
$ dpkg-awk "regexp" -- Fields to print
regexp is optional (and handling of white space in regexp seems to be 
broken)

If you run unstable or testing (or Knoppix), there is a program called 
dpkg-query.  It is a little bit easier to use then dpkg-awk.  Woody`s 
dpkg does not have dpkg-query (which is excelent tool).
This page:
http://www.knoppix.net/docs/index.php/KnoppixRemasteringHowto
has some examples of dpkg-query

Or you can write you own script to scan /var/lib/dpkg/status :-)

0
Reply dont.spam.me1 (37) 1/2/2004 3:22:28 AM


1 Replies
31 Views

(page loaded in 0.047 seconds)


Reply: