bash - batch processing folder of files by name

Hello Everyone!!!

I need some help with a shellscript to batch process a folder of files with the imagemagick convert -append/+append command. The folder contains some hundred or thousand of small images in .png format which I would like to join together in order of their filenames. The filenames follow a pattern like this:

File 1: 11.123456_8.043589.png
File 2: 11.123456_9.320411.png
File 3: 12.843211_8.043589.png
File 4: 12.843211_9.320411.png

What I want to do is join all files with the same number in the first part of the filename (before the underscore) with the convert +append command to a row and afterwards join these rows together with the convert -append comand. This could also be a second script, if easier.
I figured out the imagemagick part of this, but as an absolute beginner to shellscripting, I have no clue how to get a appropriate shellscript up and running. I have searched the forum but didn't find anything that worked out for me or pointed me in the right direction. I would really appreciate some help here!

Greetings,

Gerd

I dont know imagemagick convert -append/+append command
so, if you could explain the output you desire with the example, may be I can help.

Thank you for the quick response! Well, the desired output is a big image of all files in that folder. The imagemagick convert command joins given imagefiles together, either vertically (-append) or horizontally (+append). So what the script should do is select the files that belong together by the first part of the filename and then join them via the convert comand and save them with a prefix and the first part of the name, then select the next files that belong together...join and save them...and so on. At the end I would end up with a bunch of horizontally joined files, for example:

row_11.123456.png (File1 and File2)
row_12.843211.png (File3 and File4)

In a second step these files again will be combined vertically, but I think this can be achieved simply by running the convert -append command on them. Hope I could make it a bit more clear...

Tried google, cant find much...
but you will need find and xargs ...
Sorry for not being of much help.