星期四, 3月 19, 2015

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
張貼留言