How to print third column to last column?

前端 未结 19 2035
面向向阳花
面向向阳花 2020-11-28 18:44

I\'m trying to remove the first two columns (of which I\'m not interested in) from a DbgView log file. I can\'t seem to find an example that prints from column 3 onwards unt

19条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-28 19:10

    A bit late here, but none of the above seemed to work. Try this, using printf, inserts spaces between each. I chose to not have newline at the end.

    awk '{for(i=3;i<=NF;++i) printf("%s ",  $i) }'
    

提交回复
热议问题