Problems running bash on some wierd csh server???

Problem is in the title.

Had an issue running a bash script on a wacky csh server.

which sh

Then just add the below to the script, you never know this might save your life :D!


Use AWK for sum and average

Found a handy snippet for getting the sum and average of some data in a text file using AWK.

Just run the below query on your data

awk '{ s += $1 } END { print "sum: ", s, " average: ", s/NR, " samples: ", NR }'