dotfiles/.local/bin/scripts/=

8 lines
120 B
Plaintext
Raw Normal View History

#!/bin/sh
IFS=' '
calc="${*//p/+}"
calc="${calc//./}"
calc="${calc//,/.}"
calc="${calc//x/*}"
bc -l <<<"scale=10;$calc"