perl -e '$module=$ARGV[0]; @ps=`ps -eaf`; shift @ps if $ps[0]=~/^UID|^USER/; @ps=grep {/$module/} @ps; $pid=+(split / +/, $ps[0])[1]; warn "pid: $pid"; warn "multiple matches" if $#ps>0; warn @ps' urxvt