Re: OK, break it down for me... (question about gzip)
Re: OK, break it down for me... (question about gzip)
- Subject: Re: OK, break it down for me... (question about gzip)
- From: Alastair Houghton <email@hidden>
- Date: Tue, 8 Jun 2010 11:40:50 +0100
On 8 Jun 2010, at 07:25, Graham Cox wrote:
> On 08/06/2010, at 4:16 PM, Stephen J. Butler wrote:
>
>> b) In a working OS X system, the unix executables will always be where
>> they're supposed to be (ie: /bin, /sbin, /usr/bin, /usr/sbin, etc).
>
> Thanks Stephen, so given the four choices I looked at each and find zip in /usr/bin
>
> The question is can I be sure it's there on every system, no matter how the user is logged in? i.e. can I hard-code the path?
Yes. *Don't* as someone else suggested use the "which" (or /usr/bin/env, which would be better) to locate it, because if you do that you might pick up a version of zip that you haven't tested against (or some other program entirely that happens to have installed an executable called "zip"). Hard-coding the path is the right thing to do.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden