1. 9

  2. 3

    I feel like this is saying “the shell is bad at maths” which is certainly true. I often use incantations involving dc which aren’t… pretty.

    That said, did you consider using BPF for this? I think the tools that ship with it on many distros are sufficient – and they’re intended for this exact use case!