EDIT:
as Paul_Pedant commented: this is my idea of the structure of the script, in pseudocode:
loop begin
# via awk or sed?
for every filename
mkdir based on {year}-{place} or {year}-{year}-place
mv corresponding files to directory
loop end
mkdir has an option to not create a directory that already exists, correct? Because otherwise my abovementioned idea to do it all in one loop would be not very clever, as many photos are supposed to go in one directory, creating it anew every time would lose the photos already moved, right?
Examples of filenames:
1980-1981-Bali-055-21a.jpg
1980-1981-Bali-055-21.jpg
1980-1981-Bali-055a-21.jpg
1980-Bali-055-21.jpg
1980-Bali-055a-21.jpg
I also thought about not searching the filenames from the beginning, as there definitely can be year-year-place-film-photo as well as year-place-film-photo, but from the end, see this codesnippet:
echo "1980-Bali-055a-028.jpg" | sed -e "s/-[0-9a-zA-Z]*-[0-9]*.jpg$//"
but I'm not 100 % sure that film-photo.jpg is always (!) the end of the filename, there are so many and I didn' scan the diapositives.
Thanks for your input!