Averaging multiple columns

Hello,

I am trying to average multiple columns simultaneously while skipping the first column.

I am using this awk line to average one column

awk '{sum+=$3} END { print "Average = ",sum/NR}' 

But I want to be able to do it for multiple columns while skipping the first column. There are like 500 columns..

my file1 looks something like this:

jay  2  3  4
jon  2  3  4
jur  2  3  4
jam 2  3  4

I want the output to loo like this (which is the average of the file1 while skipping the first column)

2  3  4 

thank you

nawk '
  {for(i=2;i<=NF;i++) s+=$i}
  END {for(i=2; i in s;i++) printf("%.2f%c", s/NR, ((i+1) in s)?OFS:ORS)}
' myFile

just curious, how would i make it skip the first two columns (instead of just the first)..

thanks

Do you see anything in the code that deals with the columns?
Try experimenting a bit....

awk '{for(i=c;++i<=NF;)s+=$i}END{for(i=c;++i in s;)printf("%.2f%c",s/NR,((i+1) in s)?FS:RS)}' c=2 file

Just a spin-up of vgersh99 solution :rolleyes:
The value of c will set how many columns to crop from the beginning.