How to run NSTask with multiple commands

后端 未结 3 546
感动是毒
感动是毒 2021-01-01 04:08

I\'m trying to make a NSTask running a command like this:

ps -clx | grep \'Finder\' | awk \'{print $2}\'

Here is my method

3条回答
  •  独厮守ぢ
    2021-01-01 04:31

    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.

提交回复
热议问题