use a script like this:
#!/bin/sh
proc=${1}
if [ -z ${proc} ]; then
echo "usage: $0 process_name";
exit 1;
fi
ps ax | awk "\$5 ~ /$proc/ { print \$0 }"
Alternatively, use "print \$1" instead of the final "print \$0" to print only the actual PID.
Last edited by roboshark; 08-19-2004 at 07:47 AM..
|