Now I finally understand...!

You could write a bash for loop to do that.