Problem running on ubuntu

In ubuntu this has to be ran as a bash script. Also you need ‘bc’ installed on the system