Example of data
06-7-1-B.png
06-7-2-B.png
07-3-1-B.png
07-3-2-B.png
06-6-1-P.png
06-6-2-P.png
07-12-1-P.png
07-12-2-P.png
07-6-1-P.png
07-6-2-P.png
07-7-1-P.png
07-7-2-P.png
08-2-1-P.png
08-2-2-P.png
08-2-3-P.png
08-7-1-P.png
08-7-2-P.png
08-7-3-P.png
08-7-4-P.png
08-9-1-P.png
08-9-2-P.png
I want to join the files together as follows. For instance, the files 06-7-1-B.png and 06-7-2.png should be joined together and renamed as 06-7-B.png.
How can you create one file either png or pdf from many png -files in terminal?