Shellcheck marked the script as violating SC2044. Instead of re-writing the Bash from scratch, just use Python.