chalcopyrites
Technical User
Hi,
I hope you can help me. I have a file like this:
300.0757
-999.2500 23.0000 -999.2500 -999.2500 -999.2500
-999.2500 -999.2500 -999.2500 -999.250000 -999.2500
-999.2500 -999.2500 -999.2500 -999.250000 -999.2500
-999.2500 -999.2500 -999.250000 -999.2500 -999.2500
-999.2500 -999.2500 -999.2500 -999.2500
300.2281
-999.2500 23.0000 -999.2500 -999.2500 -999.2500
-999.2500 -999.2500 -999.2500 -999.250000 -999.2500
-999.2500 -999.2500 -999.2500 -999.250000 -999.2500
-999.2500 -999.2500 -999.250000 -999.2500 -999.2500
-999.2500 -999.2500 -999.2500 -999.2500
300.3805
-999.2500 23.0000 -999.2500 -999.2500 -999.2500
-999.2500 -999.2500 -999.2500 -999.250000 -999.2500
-999.2500 -999.2500 -999.2500 -999.250000 -999.2500
-999.2500 -999.2500 -999.250000 -999.2500 -999.2500
-999.2500 -999.2500 -999.2500 -999.2500
....etc
Every 6 lines is a block of data I would like to have on a single line. I know awk '{printf("%s",$0)}' ip > op will put everything onto one line (upto a certain limit) but I dont know how to tell it to do this to blocks of 6 lines.
I would be interested to see what you suggest,
Many thanks
Erica
I hope you can help me. I have a file like this:
300.0757
-999.2500 23.0000 -999.2500 -999.2500 -999.2500
-999.2500 -999.2500 -999.2500 -999.250000 -999.2500
-999.2500 -999.2500 -999.2500 -999.250000 -999.2500
-999.2500 -999.2500 -999.250000 -999.2500 -999.2500
-999.2500 -999.2500 -999.2500 -999.2500
300.2281
-999.2500 23.0000 -999.2500 -999.2500 -999.2500
-999.2500 -999.2500 -999.2500 -999.250000 -999.2500
-999.2500 -999.2500 -999.2500 -999.250000 -999.2500
-999.2500 -999.2500 -999.250000 -999.2500 -999.2500
-999.2500 -999.2500 -999.2500 -999.2500
300.3805
-999.2500 23.0000 -999.2500 -999.2500 -999.2500
-999.2500 -999.2500 -999.2500 -999.250000 -999.2500
-999.2500 -999.2500 -999.2500 -999.250000 -999.2500
-999.2500 -999.2500 -999.250000 -999.2500 -999.2500
-999.2500 -999.2500 -999.2500 -999.2500
....etc
Every 6 lines is a block of data I would like to have on a single line. I know awk '{printf("%s",$0)}' ip > op will put everything onto one line (upto a certain limit) but I dont know how to tell it to do this to blocks of 6 lines.
I would be interested to see what you suggest,
Many thanks
Erica