Pid Command
Tagged with: command, grep, head, Linux, pid, process, ps, sed
Friday, December 14th, 2007 11:12 AM
Create a command that will return the pid of the given command string..
#!/bin/sh
ps aux|grep $1|head -n1|awk '{print $2}'
Create a command that will return the pid of the given command string..
#!/bin/sh
ps aux|grep $1|head -n1|awk '{print $2}'