[nycbug-talk] pkg_info

Jan Schaumann jschauma
Mon Feb 23 18:50:32 EST 2004

Marc Spitzer <mspitze1 at optonline.net> wrote:
> pkg_info |awk '{print $1}'

pkg_info | cut -d' ' -f1
pkg_info | sed -e 's/\(^[^ ]*\).*/\1/'

But 'ls /var/db/pkg' and 'pkg_info -e '*'' are faster than the three
above (and speed sure counts in this instance, n'est-ce pas?).

And for extra-credit, if you hosed your system and can't use either
pkg_info or ls, you can let the shell do it all for you:

cd /var/db/pkg
echo *


I always said there was something fundamentally wrong with the universe.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://lists.nycbug.org/pipermail/talk/attachments/20040223/6e59103d/attachment.bin 

More information about the talk mailing list