awk + Need to print everything (all rest fields) except $1 and $2

后端 未结 7 2168
既然无缘
既然无缘 2020-12-28 19:37

I have the following file and I need to print everything except $1 and $2 by awk

File:

INFORMATION DATA 12 33          


        
相关标签:
7条回答
  • 2020-12-28 20:19

    danbens answer leaves a whitespace at the end of the resulting string. so the correct way to do it would be:

    awk '{for (i=3; i<NF; i++) printf $i " "; print $NF}' filename
    
    0 讨论(0)
提交回复
热议问题