Skip to content

Instantly share code, notes, and snippets.

View huaizhixu's full-sized avatar
🍊

Huai Zhi Xu huaizhixu

🍊
View GitHub Profile
@huaizhixu
huaizhixu / pdf-grep
Created December 15, 2023 01:17 — forked from ngregoire/pdf-grep
Grep through PDF files
#!/bin/bash
# Three arguments: ROOT_DIR, PATTERN, OPTIONS
# Search below $ROOT_DIR for PDF files matching $PATTERN
# $OPTIONS is passed to pdfgrep (ex: grep-pdf . 'some words' -h -C5)
# ROOT_DIR
if [ -z "$1" ]; then
echo "! Argument ROOT_DIR is needed!"