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

后端 未结 7 2192
既然无缘
既然无缘 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:10

    Here's another awk solution, that's more flexible than the cut one and is shorter than the other awk ones. Assuming your separators are single spaces (modify the regex as necessary if they are not):

    awk --posix '{sub(/([^ ]* ){2}/, ""); print}'
    

提交回复
热议问题