P ./cool.sh: line 31: bc: command not found ./cool.sh: line 34: bc: command not found ./cool.sh: line 37: bc: command not found E ./cool.sh: line 31: bc: command not found ./cool.sh: line 34: bc: command not found ./cool.sh: line 37: bc: command not found

Very wow. Shame they assumed everyone has "bc"...

Why would that be a shame? "bc" is a mandatory POSIX command, while /bin/bash isn't (/bin/sh is the standard).

[deleted]

Which distro are you running? Perchance did you run the shell script in alpine Linux (docker)?

it doesn't seem to be installed on my endeavouros laptop

[deleted]

Debian.

You are fun.

Are we really at the "redditor insult" type comments stage of HN now? There is nothing wrong with saying a piece of code is broken.

Broken seems a little hyperbolic, it has an implicit dependency on a standard POSIX tool.

I suppose, but my Debian didn’t seem to ship with it.

[deleted]