ref: d208afc56c6a82f00bd21264301b4c915e4eb3d6 dir: rc/fpl
#!/bin/rc ps -n | awk ' / play$/ { g[++i] = $3 } { for(n=1; n<=i; n++) if(g[n] == $3) p[n] = $2 } END { for(n=1; n<=i; n++) print p[n] } '