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
wkhtmltopdf $(cat urlsfile) my.pdf
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.