Create a command that will return the pid of the given command string..
#!/bin/sh ps aux|grep $1|head -n1|awk '{print $2}'
This entry was posted on Friday, December 14th, 2007 at 11:12 am and is filed under Command Line, Linux. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Name (required)
Mail (will not be published) (required)
Website
Notify me of followup comments via e-mail