Re: command-line test for 64-bit hardware?
Re: command-line test for 64-bit hardware?
- Subject: Re: command-line test for 64-bit hardware?
- From: Steve Checkoway <email@hidden>
- Date: Thu, 6 Sep 2007 05:27:08 -0700
On Sep 5, 2007, at 12:32 PM, Kyle Sluder wrote:
`sysctl -n hw.optional.x86_64' will give you what you want. Though,
since this is going to be used from a shell, you'll probably want to
wrap it in a test, because sysctl returns 0 for no and 1 for yes.
Are you saying that on intel, sysctl returns the opposite of the
standard values?
steve$ sysctl -n hw.optional.x86_64
second level name optional in hw.optional.x86_64 is invalid
steve$ echo $?
1
steve$ sysctl -n hw.ncpu
2
steve$ echo $?
0
steve$ if sysctl -n hw.optional.x86_64 2>/dev/null; then echo x86_64;
else echo not; fi
not
Seems like it works for me (on ppc).
--
Steve Checkoway
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden