• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: command-line test for 64-bit hardware?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: command-line test for 64-bit hardware?


  • Subject: Re: command-line test for 64-bit hardware?
  • From: "Kyle Sluder" <email@hidden>
  • Date: Thu, 6 Sep 2007 11:18:56 -0400

I'm not talking about error codes, I'm talking about stdout.  sysctl
prints 1 for true and 0 for false.

--Kyle Sluder

On 9/6/07, Steve Checkoway <email@hidden> wrote:
>
> 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
>
>
>
>
>  _______________________________________________
> 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
>
>
 _______________________________________________
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

  • Follow-Ups:
    • Re: command-line test for 64-bit hardware?
      • From: Steve Checkoway <email@hidden>
References: 
 >Re: command-line test for 64-bit hardware? (From: "Kyle Sluder" <email@hidden>)
 >Re: command-line test for 64-bit hardware? (From: Steve Checkoway <email@hidden>)

  • Prev by Date: Re: Timestamps
  • Next by Date: Re: Timestamps
  • Previous by thread: Re: command-line test for 64-bit hardware?
  • Next by thread: Re: command-line test for 64-bit hardware?
  • Index(es):
    • Date
    • Thread