ps ax | awk '/programname/ && !/awk/ {print $1}' [download]
In reply to Getting another process's pid by blackjudas