内容简介:Linux 求某一列平均值
Linux 求某一列平均值
1.0
2.0
3.0
要求这些数字的平均值,可用如下方法:
cat data|awk '{sum+=$1} END {print "Average = ", sum/NR}'
其中,$1表示第一列
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:- 算法 - 最好、最坏、平均复杂度
- 理解 Linux 的平均负载和性能监控
- 新的网络优化方法:随机权值平均
- 平均3293颗星的34个年度开源Python库
- [译] Linux Load Averages:什么是平均负载?
- 两部门要求推动移动网络流量平均资费降低20%以上
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Cracking the Coding Interview
Gayle Laakmann McDowell / CareerCup / 2015-7-1 / USD 39.95
Cracking the Coding Interview, 6th Edition is here to help you through this process, teaching you what you need to know and enabling you to perform at your very best. I've coached and interviewed hund......一起来看看 《Cracking the Coding Interview》 这本书的介绍吧!