0

I've got the next file:

Ca 1
 1 -5.338208778 -0.000000000 -15.624910016
Ca 2
 2 -2.262452484 -2.494999886 -12.589102506
Ca 3
 3 -8.095800400 -2.494999886 5.624757806
Ca 4
 4 -7.282658184 -0.000000000 -9.553623225
Ca 5
 5 -4.206901709 -2.494999886 -6.517815410
Ca 6
 6 -1.131307069 0.000000000 -3.482008572
Ca 7
 7 -6.151351054 -2.494999886 -0.446529291
Ca 8
 8 -3.075756535 0.000000000 2.589278525
.. .. .. ... .. .. ..

I would like to delete the first field of the even rows (the number). I tried withawk but I didn't find the solution...

Many thanks in advance. Git.

EDIT

The output should be like:

Ca 1
   -5.338208778 -0.000000000 -15.624910016
Ca 2
   -2.262452484 -2.494999886 -12.589102506
Ca 3
   -8.095800400 -2.494999886 5.624757806
Ca 4
   -7.282658184 -0.000000000 -9.553623225
Ca 5
   -4.206901709 -2.494999886 -6.517815410
Ca 6
   -1.131307069 0.000000000 -3.482008572
Ca 7
   -6.151351054 -2.494999886 -0.446529291
Ca 8
   -3.075756535 0.000000000 2.589278525
.. .. .. ... .. .. ..
git
  • 151
  • 9
  • 1
    Can you post expected output? – nu11p01n73R Nov 26 '15 at 08:04
  • @nu11p01n73R Yeah! Edit to show you the desired output. Thanks – git Nov 26 '15 at 08:06
  • 1
    I think is not duplicate becose nobody dealing with the even rows: the answer proposed just delete the first field of whole rows not even rows. please, help. – git Nov 26 '15 at 09:02
  • I got it finally the solution `awk 'NR%2==0 {print $1="", $2, $3, $4} NR%2==1 {print $1, $2}' file` if these serve to others. – git Nov 26 '15 at 11:15

0 Answers0