我想使用awk执行以下操作:
文件使用标签作为字段分隔符
我输入标题和第一行数据的示例
"Column1" "Column2" "Column3" "Column4" "Column5"
"a1" "b2" "c3" "d4" "e5"
期望的输出
"Column4" "Column1" "Column2" "Column3" "Column5"
"d4" "a1" "b2" "c3" "e5"
答案 0 :(得分:1)
只需按所需顺序排列字段:
awk '{print $4, $1, $2, $3, $5}' your-file