doesn’t work on gentoo

./check_cpu_se.sh
gives output on redhat but error on command line 118 and several others on gentoo,
works through nrpe and draws graphs on pnp4nagios