AWK can be great for simple statistics. I wrote the "num command" tool entirely in gawk, to handle typical math for averages, modes, deviations, kurtosis, etc. It's handy for use on systems where a user can't easily install R/Julia/NumPy/etc.
AWK can be great for simple statistics. I wrote the "num command" tool entirely in gawk, to handle typical math for averages, modes, deviations, kurtosis, etc. It's handy for use on systems where a user can't easily install R/Julia/NumPy/etc.
It was using an old bash script(!), to generate the file. I was able learn little awk, and was able to write a 100 line awk script to replicate the same. Apart from the efficiency of the script, which was the main aim, it was impressive how readable and understandable the whole thing became. Some subtle bugs became apparent.
It is not do-all language. Yet, in its small niche, it is very succinct in expressing the text processing ideas. I know it could be done easily in any other language.
A port of bash to awk script : https://github.com/berry-thawson/diff2html/blob/master/diff2...
https://github.com/berry-thawson/diff2html
Original bash counterpart: https://web.archive.org/web/20180612205114/https://github.co...
Edit: Changing link and added new links
Nice, is it just me/my browser or is http://www.numcommand.com/ down? I was hoping to see if it’s packaged for my distro.
That's pretty cool! It's really packed with features.