about summary refs log tree commit diff
path: root/xgrep
diff options
context:
space:
mode:
Diffstat (limited to 'xgrep')
-rwxr-xr-xxgrep8
1 files changed, 8 insertions, 0 deletions
diff --git a/xgrep b/xgrep
new file mode 100755
index 0000000..20be2a3
--- /dev/null
+++ b/xgrep
@@ -0,0 +1,8 @@
+#!/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 grep -d skip -e "$PATTERN"