What are the best commands and scripts to browse the ports collection from
the command line?

I've been using, make search key="xyz" and the script below to list the
DESCR files.

#!/bin/sh
# filename catdescr.sh
# usage: catdescr.sh directory letter
# "catdescr.sh security a"  will list the DESCR files
# of ports starting with the letter "a"
# in the /usr/ports/security directory

if [ ! $1 ]; then
 echo "usage: catdescr.sh ports_directory optionanl_letter";
 exit;
fi

for ff in /usr/ports/$1/$2*; do
 echo "****************************************";
 echo "**  $ff  **";
 echo "****************************************";
 cat $ff/pkg/DESCR;
 echo " ";
done

Reply via email to