PC? Can be done on device with a text editor. However, it maybe something else as your uptime isn't high enough to cause the issue I am thinking of. If you run the script in a terminal and post the output, I maybe able to see were the script is failing better.
/opt/flopswap/script $ sh swapused.sh ublocks swapused.sh: line 38: arithmetic syntax error