How to print all the columns after a particular number using awk?

后端 未结 11 643
一生所求
一生所求 2020-12-22 20:23

On shell, I pipe to awk when I need a particular column.

This prints column 9, for example:

... | awk \'{print $9}\'

How can I tell

11条回答
  •  醉梦人生
    2020-12-22 21:15

    Generally perl replaces awk/sed/grep et. al., and is much more portable (as well as just being a better penknife).

    perl -lane 'print "@F[8..$#F]"'
    

    Timtowtdi applies of course.

提交回复
热议问题