Skip to content

Instantly share code, notes, and snippets.

@AndreiCherniaev
Created September 16, 2025 02:12
Show Gist options
  • Save AndreiCherniaev/be1e08f2fe2e988f990e6772f3efa6b0 to your computer and use it in GitHub Desktop.
Save AndreiCherniaev/be1e08f2fe2e988f990e6772f3efa6b0 to your computer and use it in GitHub Desktop.
Command-line tool to search docx files
# https://unix.stackexchange.com/a/743302/481341
docx_pptx_grep() {
keyword="$1"
/usr/bin/fdfind -t f -e docx -e pptx . | while read -r arg; do
if unzip -p "$arg" 2>/dev/null | rg -q --ignore-case --fixed-strings "$keyword"; then
echo "$arg"
fi
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment