Answers for "bash calculate the mean of a column"

1

bash calculate the mean of a column

# 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
Posted by: Guest on October-10-2020

Code answers related to "bash calculate the mean of a column"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language