Instead of ps, you could use pgrep -n -u vasuperl tcpdump
You need to do less munging of the return value as it just gives you the process id of the last command (-n) containing the string 'tcpdump' executed by the user (-u) 'vasuperl'.
In reply to Re: How to get the process Id
by Myrddin Wyllt
in thread How to get the process Id
by vasuperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |