I need to get a list of PDFs in various sub-folders of a directory structure and the number of pages of each PDF file. All saved into a CSV file, i.e. <filename>,<number_of_pages>.
I have used fd and qpdf to extract the number of pages recursively:
fd ".pdf" --type f -x qpdf --show-npages {/}
I tried to incorporate echo or printf in the command line to generate the CSV but without success.