I want to use pdfunite to merge several pdf-files into one output file. Since the directory contains lots of different stuff, I thought i could use ls/grep to get the apropriate file-names and then use pdfunite to get it put together. The output of ls/grep look like this:
ls | grep "handout...pdf"
handout01.pdf*
handout02.pdf*
handout03.pdf*
handout04.pdf*
handout05.pdf*
handout06.pdf*
Then I want to invoke pdfunit, which has the following syntax:
pdfunite [options] PDF-sourcefile1..PDF-sourcefilen PDF-destfile
My Problem is, that it does not seem like I can pipe the output of ls/grep into pdfunite, because it is not supposed to work like that. On the otherhand, if I try:
pdfunite ls | grep "handout...pdf" grep.pdf
then grep obviously complains about my chosen output-file:
grep: grep.pdf: No such file or directory
I know I could do two seperate steps and then it would work, but I'd like to figure out how to do this with one line.