awk取出特定字段
How to print all fields after a certain field with awk on Linux?
Say, I want to print out all fields after field $3
:
说,我要打印出字段$3
之后的所有字段:
a b c d e f
a b b b
a a c d
should be transformed to
应该转化为
d e f
b
d
You may use a for loop in awk to print fields from $4
to $NF
with a space as the separator:
您可以在awk中使用for循环来打印从