ref: 5c31b9e4b81774d7e7f96e09ba4b993152830fdc 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] } '