📜  bash 计算列的平均值 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:31.704000             🧑  作者: Mango

代码示例1
# Example usage:
awk 'BEGIN{s=0;}{s=s+$1;}END{print s/NR;}' input_file # Mean of column 1
# Change the 1 to the number of the column for which you want the mean