#!/bin/sh # xgrep PATTERN PKGS... - search files limited to XBPS package contents PATTERN=${1:?pattern missing} shift for pkg; do xbps-query -f "$pkg" done | sed 's/ -> .*//' | xargs -d'\n' grep -H -d skip -e "$PATTERN"