awk去掉每行最后n个字符

awk '{sub(/.{n}$/,"")}1' nation.tbl > nation.tbl2

把n替换成具体长度

原文地址:https://www.cnblogs.com/lavezhang/p/9834107.html