Assuming I have the values A B C D E and eight places 1 2 3 4 5 6 7 8. How can I get all possible combinations printed with two- and three-time repetitions?
Example:
1 2 3 4 5 6 7 8 _______________ A A B B C C D E A B B C C D D E (and so on...) A A A B B C D E A B B B C C D E (and so on...) Which combination is followed by which is not further important. There should not be any missing values like AABBCCDD (where E is missing)
bash? If 1 then ask about the algorithm first. If 2 then show the algorithm (or a link to it) in the question. I think this question is not specifically related to UNIX or Linux and might better fit on stackoverflow.com.