toxicsoftware.com

RANDOMIZE USR 0

toxicsoftware.com header image 2

Bash weirdness on Mac OS X Intel boxes

May 15th, 2006 · Comments · Uncategorized

Just a quickie (to prevent my blog from becoming a dinosaur and eventually fossil fuel…)

If you’re running bash on an Intel Mac you might see some interesting behavior if you inspect the shell’s variables:

[jwight@ratatosk] jwight$ set | grep TYPE
HOSTTYPE=powerpc
MACHTYPE=powerpc-apple-darwin8.0
OSTYPE=darwin8.0

PowerPC? Darwin 8.0? On my Quad G5 I get identical results. Checking the bash binary with the ’strings’ command seems to show these values are hardcoded:

[jwight@ratatosk] jwight$ strings `which bash` | grep powerpc
powerpc-apple-darwin8.0
powerpc

Looks like the OS version and the processor type is hardcoded into bash.

Oh and for the record this is what ‘uname’ reports:

[jwight@ratatosk] jwight$ uname -a
Darwin ratatosk 8.6.1 Darwin Kernel Version 8.6.1: Tue Mar  7 16:55:45 PST 2006; root:xnu-792.9.22.obj~1/RELEASE_I386 i386 i386

Tags:

Viewing 5 Comments

blog comments powered by Disqus