I am trying to use an awk script that compiles several lines into one; how can I do that?
I'm using the command:
awk < $pot/towhee.prod 'NR==411{print$5,$6}''NR==412{print$5,$6}''NR==430{print$7,$8}'
and it produces this:
0.24975E-01 0.00000E+00
0.36574E+04 0.59343E+02
-3340.691 0.399
but I want this:
0.24975E-01 0.00000E+00 0.36574E+04 0.59343E+02 -3340.691 0.399
How can I do it?
paste -sd ' ' -
(note that you can doNR == 411 || NR == 412 {print $5, $6}
)