Convert apache_ps script to bash