Parse string with bash and extract number
Solution with awk and cut
vinko@parrot:~$ cat testfrontend RUNNING pid 16652, uptime 2:11:17nginx RUNNING pid 16651, uptime 2:11:17redis RUNNING pid 16607, uptime 2:11:32vinko@parrot:~$ awk '{print $4}' test | cut -d, -f 1166521665116607
for nginx only:
vinko@parrot:~$ grep nginx test | awk '{print $4}' | cut -d, -f 116651