Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Find out if a mac is PPC/Intel in bash (See related posts)

// This checks the processor type in bash

if [[ `sysctl hw.machine` = "hw.machine: Power Macintosh" ]]; then 
        PROCESSOR='PowerPC'
else
        PROCESSOR='Intel'
fi

Comments on this post

nriley posts on Nov 19, 2006 at 05:20
Even simpler, there's `arch`, which returns 'ppc' or 'i386'.

You need to create an account or log in to post comments to this site.


Related Posts