Useful Unix commands for data science
I like slicing and dicing with awk, grep and friends too.<p>One thing I find odd that you have to drop to a full language (awk, perl etc) to sum a column of numbers. Am I missing a utility?<p><pre><code>  echo "1\n2\n3\n" | sum # should print 6 with hyphothetical sum command
</code></pre>
I suppose more generally you could have a 'fold initial op' and:<p><pre><code>  echo "1\n2\n3\n4\n" | fold 0 +   # should print 10
  echo "1\n2\n3\n4\n" | fold 1 \*  # should print 24
</code></pre>
But I guess at that point you're close enough to using awk/perk/whatever anyway. Which probably answers my question.