improvement of grep -oP. extract only the pid.