らんだむな記憶

blogというものを体験してみようか!的なー

外部コマンドの実行

objective c - Execute a terminal command from a Cocoa app - Stack Overflowのような感じで。
What is the sh -c command? - Ask Ubuntu

You can simulate login-shells behavior using the -l option:

を参考にして /bin/sh -c 部分を /bin/bash -lc で実装してやると、 ~/.bash_profile などが読み込まれた状態をシミュレートできるので $PATH を通して使っている外部コマンドなどを呼び出しやすくなる。