System Info
alinuxchap@libertus-desktop:/usr/share/X11/xkb $ uname -a
Linux libertus-desktop 6.12.25+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.25-1+rpt1 (2025-04-30) aarch64 GNU/Linux
alinuxchap@libertus-desktop:/usr/share/X11/xkb $
Cmd
cd /home/alinuxchap/Documents/shared/dat/EDS/it
echo "" > output.txt
while read author; do
echo $author
pdfgrep "$author" *.pdf |& tee -a output.txt
done <authors.txt
Problem
- grep outputs text matches in bold and red
- I don't want to use
grep -pas I also need to see the 'snippet' of context the term is being used in
It's useful for archiving command output as 'logs'; the same problem arises with copy and paste, as that doesn't preserve rtf either.
output.txtfor?output.txtis just going to be an empty file. Is the intent to put the output of thewhile read ...command intooutput.txt?while read author; do ... done <input.txt >output.txt, or evenwhile read author; do ... done >output.txt <input.txt.