#!/bin/sh (locate bom; find /Library/Receipts -name \*.bom) | grep -E '\.bom$' | sort -u | while read LINE; do if lsbom -s "$LINE" 2>&1 | grep -q "$@"; then echo "$LINE" | sed -e 's,^/Library/Receipts/,,' -e 's,/.*$,,' fi done | sort -u | grep -v -E '^$'