How to print third column to last column?

前端 未结 19 2110
面向向阳花
面向向阳花 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 18:51

    awk '{a=match($0, $3); print substr($0,a)}'
    

    First you find the position of the start of the third column. With substr you will print the whole line ($0) starting at the position(in this case a) to the end of the line.

提交回复
热议问题