I'm trying to rename a bunch of pdfs based on a specific line in the files.
So far, I'm converting to text, then using awk to print line 41. But that's as far as I've got.
I've tried usings xargs to pass the awk output to a mv command, but no dice to date.
I know I'm probably going about this the wrong way, but if anyway can shed some light I'd really appreciate it.
I'm trying to this without bash, so that I can make an alias of it btw.
ls *.pdf | xargs -n1 mv `ls *.pdf | xargs -n1 pdftotext; ls page_*.txt | xargs -n1 awk 'NR==41'`.txt'