This script merge files with spaces in the name and sorts them by name.
Enter in a directory with PDFs and execute:
ls -v *.pdf | bash -c 'IFS=$'"'"'\n'"'"' read -d "" -ra x;pdfunite "${x[@]}" output.pdf'
This script merge files with spaces in the name and sorts them by name.
Enter in a directory with PDFs and execute:
ls -v *.pdf | bash -c 'IFS=$'"'"'\n'"'"' read -d "" -ra x;pdfunite "${x[@]}" output.pdf'
or
all files (pdf) in directory:
ls -v *.pdf | bash -c 'IFS=$'"'"'\n'"'"' read -d "" -ra x;pdfunite "${x[@]}" output.pdf'