Code:
# cat tst
12,23,45,1,2,3,5,54,8,4,1,65,6,6
1,2,3,4,5
# nawk -F, '{for(i=1;i<NF;i++){for(j=i+1;j<=NF;j++) x=(x?x" ":y)$i","$j;print x;x=y}}' tst
12,23 12,45 12,1 12,2 12,3 12,5 12,54 12,8 12,4 12,1 12,65 12,6 12,6
23,45 23,1 23,2 23,3 23,5 23,54 23,8 23,4 23,1 23,65 23,6 23,6
45,1 45,2 45,3 45,5 45,54 45,8 45,4 45,1 45,65 45,6 45,6
1,2 1,3 1,5 1,54 1,8 1,4 1,1 1,65 1,6 1,6
2,3 2,5 2,54 2,8 2,4 2,1 2,65 2,6 2,6
3,5 3,54 3,8 3,4 3,1 3,65 3,6 3,6
5,54 5,8 5,4 5,1 5,65 5,6 5,6
54,8 54,4 54,1 54,65 54,6 54,6
8,4 8,1 8,65 8,6 8,6
4,1 4,65 4,6 4,6
1,65 1,6 1,6
65,6 65,6
6,6
1,2 1,3 1,4 1,5
2,3 2,4 2,5
3,4 3,5
4,5