I\'ve got supervisor\'s status output, looking like this.
frontend RUNNING pid 16652, uptime 2:11:17 nginx
assuming that the grep implementation supports the -o option, you could use two greps:
-o
output \ | grep -o '^nginx[[:space:]]\+[[:upper:]]\+[[:space:]]\+pid [0-9]\+' \ | grep -o '[0-9]\+$'