From: Martin C. <cos...@wa...> - 2009-04-24 08:43:21
|
Charles Lepple wrote: [] > 'grep -c' should be able to cope with empty input (returning 0), as > long as you are passing a regex (in this case, 'org.finkproject.dbus- > session'). Are you sure it isn't something else? Well, I tried this: On 10.4.11, I run launchctl list | grep -c foo It returns "0" eventually, but it can take a long time to do so, sometimes up to a minute. This is not deterministic; sometimes it returns immediately. A simple "launchctl list" returns immediately every time, as does the command I proposed, (echo ""; launchctl list) | grep -c foo Weird. -- Martin |