I have to make a permutation in bash with "eval" and "seq" commands. So I have to make first a permutation that could contain the same numbers, then I have to filter it somehow.
The teacher told me I have to use two cycle/period, one in the other. But I don't know how to do it.
The input is like:
3
The output should be:
123
132
213
231
312
321
If someone could help me, that would be great!
Edit: I want to know how to do it with these commands, my friend made it to me like this: http://pastebin.com/wM2U1SuT the teacher told me its too good, were not on this level.. i should do it with seq and eval, even if its not that good then. The second problem was that the input was 123, not 3, like 3!..