Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想去掉字段的最后一位,然后对结果数字执行一些操作,为此我运行这个 awk 命令:
awk '{if($8 == 346586 && (int($1/10))%10 == 0) {print int($1/10), $1}}' input_data
因为 $1 很长,所以我得到了这种结果:
2.02152e+17 2021523922099868685
有什么线索可以解决这个问题吗?
awk -M '$8 == 346586 && int($1/10))%10 == 0 {print int($1/10), $1}' input_data
可能会为你工作。