You can generate all the combination of any number in Shell Programming .
Here , Program to generate all the combination of 1, 2 and 3 .
Editor : vi
Shell : bash
Run : sh filename
for i in 1 2 3 do for j in 1 2 3 do for k in 1 2 3 do echo $i $j $k done done done |
OUTPUT :-
1 1 1
1 1 2
1 1 3
1 2 1
1 2 2
1 2 3
1 3 1
1 3 2
1 3 3
2 1 1
2 1 2
2 1 3
2 2 1
2 2 2
2 2 3
2 3 1
2 3 2
2 3 3
3 1 1
3 1 2
3 1 3
3 2 1
3 2 2
3 2 3
3 3 1
3 3 2
3 3 3
Thank You To All My Reader :
Related Post
1. JavaScript Basic Part-1
2. Animated moving car program : computer graphics in c
1. JavaScript Basic Part-1
2. Animated moving car program : computer graphics in c
5. JDK 8
Comments
Post a Comment