Determine the architecture of a Mac from the command line or script?

Posted by Brian Postow on Super User See other posts from Super User or by Brian Postow
Published on 2010-06-03T16:09:16Z Indexed on 2010/06/03 16:26 UTC
Read the original article Hit count: 190

Filed under:
|
|
|
|

I'm writing a shell script, and I need to know the archetecture, ie PPC or Intel. Back in the day, there was a program /bin/arch that told you, but my mac doesn't seem to have it... Is there an easy way I can do this? Grep for something in a logfile? call some other program that spits that out as a side effect?

It would be nice to know what OS Version I'm running too, but that may not be necessary.

thanks

© Super User or respective owner

Related posts about osx

Related posts about command-line