Данный:
Требуемый:
Можно преобразовать PDF, чтобы написать и затем применить grep на тот текст:
#!/bin/bash
for z in *.zip
do
zipinfo -1 "$z" | # Get the list of filenames in the zip file
while IFS= read -r f
do
unzip -p "$z" "$f" | # Extract each PDF to standard output instead of a file
pdftotext - - | # Then convert it to text, reading from stdin, writing to stdout
grep -q 1234 && echo "$z -> $f" # And finally grep the text
done
done