in reply to How to get the process Id
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'.
|
---|