5 Mar
2009
5 Mar
'09
11:43 a.m.
At 11:29 -0500 27/2/09, Jim Correia wrote:
Is there a prettier way to determine if my job is already loaded than to exec `launchctl list` and grep the output?
You don't need to grep. You can add your job label to the command and then test the exit status: $ launchctl list com.apple.coreservices.uiagent > /dev/null 2>&1 ; echo $? 0 $ launchctl list com.apple.dts.not.really.a.job > /dev/null 2>&1 ; echo $? 1 S+E -- Quinn "The Eskimo!" <http://www.apple.com/developer/> Apple Developer Relations, Developer Technical Support, Core OS/Hardware