while(motivation <= 0)

Back to the blog...
adding numbers with awk

Given the results of a aws s3 ls command, lets add up the size of the files.


awk '{sum+=$2;} END{print sum;}'

Add second column to a variable called sum and then print sum.