3 ms·
It's also use awk in that manner 99% of the time. Another common usage for awk in my case is to do floating operations (*, +, eq, gt, etc) in a shell script. I
by kakwa_ 8y ago
It's also use awk in that manner 99% of the time.
Another common usage for awk in my case is to do floating operations (*, +, eq, gt, etc) in a shell script. It avoids installing bc, which is not always present by default.
I used it for other things, like for example comparing software versions in shell scripts.
The most advanced usage of awk in my case was to do some statistic analysis (average, confidence interval, standard deviation) of network simulations.
- lozf 8y agoJust be aware there are some caveats when using awk to operate on large numbers. GNU awk has the -M option to handle precision arithmetic, but where you can't use `gawk`, `bc` may be safer afterall.