I\'m trying to make a NSTask running a command like this:
ps -clx | grep \'Finder\' | awk \'{print $2}\'
Here is my method
Almost 8 years later, I think grep binary is'nt in /usr/bin, for me it's in /bin. Also, for your awk command, you set the launch path to grep.