相关疑难解决方法(0)

如何在unix中将第一列移到最后一列?

这是文本文件中的数据.

0.354167 male atyp_angina 0.066038 0.1621 t normal 0.648855 no 0 up 0 reversable_defect <50
0.625 male typ_angina 0.792453 0.328767 f left_vent_hyper 0.564885 no 0.677419 down 0 reversable_defect <50
0.645833 male non_anginal 0.433962 0.134703 f left_vent_hyper 0.641221 no 0.483871 flat 0 normal >50_1
0.666667 female asympt 0.481132 0.413242 f left_vent_hyper 0.572519 yes 0.16129 flat 0 reversable_defect >50_1
0.270833 male typ_angina 0.509434 0.269406 f left_vent_hyper 0.816794 no 0.129032 up 0.666667 normal <50
Run Code Online (Sandbox Code Playgroud)

我必须将第一列包含数字数据移动到每一行的最后一列.

例如:

0.354167 male atyp_angina 0.066038 0.1621 t normal …
Run Code Online (Sandbox Code Playgroud)

unix linux bash awk

2
推荐指数
2
解决办法
886
查看次数

标签 统计

awk ×1

bash ×1

linux ×1

unix ×1