More than transposing!

Hi everyone,

I have a poblem like that:

I have a file which includes data looks like:

0.65214 0.3597 1.0
0.65244 0.3502 1.0
0.65273 0.3553 1.0
0.65305 0.3544 1.0
0.65327 0.3505 1.0
0.65359 0.3516 1.0
0.65578 0.6464 1.0
0.65605 0.6453 1.0
0.65633 0.6437 1.0
0.65660 0.6488 1.0
0.65688 0.6435 1.0
0.65716 0.6432 1.0
...
...
I have to convert this data to:

0.65214 0.35971.00.65244 0.35021.00.65273 0.35531.00.65305 0.35441.00.65327 0.35051.0
0.65359 0.35161.00.65578 0.64641.00.65605 0.64531.00.65633 0.64371.00.65660 0.64881.0
...
...

Yes, there is no "space" between some values. As you see, five row must convert to one row in given format.

I tried very much, but I could not get it.

Any suggestions?

Regards,
B.

awk ' { printf("%s", $0)
          if(NR%5 == 0) {printf("\n")}
      ' oldfile > newfile

Thanks.

It's very fast.

But it gives the error:

bulash@linux-sb6k:~/phoebe_data/TZ_Eri> awk ' { printf("%s", $0)
> if(NR%5 == 0) {printf("\n")}
> ' B.txt > A.dat

awk: cmd. line:3: if(NR%5 == 0) {printf("\n")}
awk: cmd. line:3:                             ^ unexpected newline or end of string

Is it normal?

Best wishes,
B.

OK it works very well...

Thanks indeed again.

B.