In Red Hat the file /etc/redhat-release
contains the operating system version data (such as "Red Hat release X.X (Final)").
Is there any similar mechanism in Mac OS X that can be used programatically to get the operating system version data (such as "Mac OS X 10.5.8")?
In case you are looking for more details to the kernel, you can also query the sysctl interface which provides the kernel ostype, version and other details.
More details here : http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man8/sysctl.8.html
Found the answer: