Using this
OF=$(ps fax | grep 'php-fpm: master process' | awk '{print $1}')
IDX=`expr index $OF ' '`
I get an error. The results of the $OF variable are:
27797 27495
What is the error here? I think it has to do with how the variable is being passed into the expression. Also, have tried putting ' quotes around the $OF variable to no avail. That just returns 0 as not found.