I have a program which takes urls as commandline arguments and output a pdf file. For example, I use command substitution to provide the input urls from a file urlsfilewkhtmltopdf $(cat urlsfile) my.pdfIn urlsfile, each line is a url.Now I would like to group every 15 lines in urlsfile, and feed a group of urls to the program at a time.How can I do that in bash?Note that it is acceptable to create a pdf file per 15 urls, and then I will merge the pdf files into one. If the merge can be done by the program, that is better.Thanks.
Group lines in a file and feed a group to a program at a time
bash;text processing