#!/bin/sh if [ -z "$1" ] then echo "usage: port-search " exit 2 fi type="$1" shift find /usr/ports/ \ -not \( -path "/usr/ports/pobj" -prune \ -o -path "*/distfiles" -prune \ -o -path "*/packages" -prune \ -o -path "*/logs" -prune \ -o -path "*/CVS" -prune \ \) \ -type f \ -iname "$type" \ -exec ugrep -F -- "$@" {} +