[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:56:40 PST 2005


Correction. ps -ax | grep [F]inder works. I¹m working on a remote machine
and didn¹t realize it wasn¹t logged in.
So just not sure the significance of the [] .

- 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/4fc6d1e5/attachment.html


More information about the X-Unix mailing list