[X-Unix] Login Hooks running items on login a little bit too
quickly
Our PAl Al
opa at nyc.rr.com
Mon Jan 10 06:36:01 PST 2005
Don't quite fully understand it but I think I can still use it.
Why do you have the [] around the F in Finder? When I use that line, it
doesn't work. ps -ax | grep Finder (without the [] ) works fine.
- opa
On 1/8/05 11:27 AM, "Juan Manuel Palacios" <jmpalaciosp at eml.cc> wrote:
>
> On Jan 7, 2005, at 7:16 PM, Our PAl Al wrote:
>
>> I don't want to hard code a delay in my shell script since delay times
>> until
>> the Finder is up can vary by machine. Anybody know how a shell script
>> could
>> determine if the Finder is is fully up before proceeding to execute?
>>
>> - opa
>
>
> $[juan at PowerBook: Pendulum](28/0,0)-> ps -ax | grep [F]inder
> 412 ?? S 0:16.91
> /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
> -psn_0_786433
> $[juan at PowerBook: Pendulum](29/0,0)-> echo $?
> 0
> $[juan at PowerBook: Pendulum](30/0,0)-> ps -ax | grep [F]ooooo
> $[juan at PowerBook: Pendulum](31/0,0)-> echo $?
> 1
>
> So I'd use:
>
> ps -ax | grep [F]inder 2>&1 >/dev/null
> if [ $(echo $?) == 0 ] ; then "proceed with your script ; fi
>
> Hope that helps! Regards,...
>
>
> Juan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.themacintoshguy.com/pipermail/x-unix/attachments/20050110/d3bfe8b3/attachment.html
More information about the X-Unix
mailing list