Created
September 16, 2025 02:12
-
-
Save AndreiCherniaev/be1e08f2fe2e988f990e6772f3efa6b0 to your computer and use it in GitHub Desktop.
Command-line tool to search docx files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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