Take the tour ×    share|improve this question add comment  1
Answer  up vote 48 down vote accepted  You have a few options:
sw_vers -productVersion   system_profiler SPSoftwareDataType
Either will do what you need, and will have an output format
that's parseable (if that's what you're after).  share|improve
this answer sw_vers is all I need. Thanks! :) –  Željko Filipin
Nov 25 '09 at 21:09 The first one only gives you the OS version
(ie, "10.7.5"). The second one gives you a lot of additional
information such as 32/64-bit. –  Kent May 27 at 22:52 add
comment  Your Answer