星期一, 5月 08, 2006

A utility that help list all package for Debian 3.1


debian31:~# cat listall.sh
#!/bin/bash

for i in /var/lib/dpkg/info/*.list
do
package=`basename $i sed s/.list//g`
if [ "$1" == "list" ]; then
echo $package
else
echo ""
dpkg --print-avail $package
cat $i
fi
done

沒有留言: