append the line with the previous if it not start with 1=

How to append the line with the previous if it not start with 1=.

1=ttt, 2=xxxxxx, 3=4545
44545, 4=66666,
1=ttt, 2=xxxxxx, 3=34434
3545, 4=66666, 5=ffffff
6=uuuuuuu, 7=ooooooo
1=ttt, 2=xxxxxx, 3=311343545, 4=66666
1=ttt, 2=xxxxxx, 5=XAXAXA, 7=FDFD

Were you looking for something like this ?

awk  '{ printf /^1/ ? ( NR>1 ? RS $0 : $0 ) : FS $0 }' file

Output

1=ttt, 2=xxxxxx, 3=4545 44545, 4=66666,
1=ttt, 2=xxxxxx, 3=34434 3545, 4=66666, 5=ffffff 6=uuuuuuu, 7=ooooooo
1=ttt, 2=xxxxxx, 3=311343545, 4=66666
1=ttt, 2=xxxxxx, 5=XAXAXA, 7=FDFD

Thanks rubin, It works fine.

Is there any chance by using sed?

TRy:

sed -e :a -e '$!N;s/\n[^1]/ /;ta' -e 'P;D' < filename