I want to grab every 5 images in a directory and merge them together into a new file with a unique filename per 5 image group.
find *.jpg | xargs -n 5 -i convert {} -append {#}.png
This is really close but the {#} doesn't output the current line count. Is this even possible with xargs?
Best Answer
If the filenames does not contain whitespaces:
Dry run:
If everything looks okay, append
| sh
.