Register
It is currently Sat Nov 01, 2014 3:04 am

Finding Operating System and version (NOT Shell Kernel!)


All times are UTC - 6 hours


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 PostPosted: Wed Nov 09, 2011 3:03 pm   

Joined: Sun Jul 17, 2011 4:21 pm
Posts: 6
Hi Community,
I am making a bash script for the Mac OS. I am trying to add support for all 4 different versions over the past few years, but I can't find a function that will return the version of the Operating System, as opposed the the Darwin version of the shell kernel. I know that i COULD use applescript through osascript to accomplish this, but that won't work in Single User Mode, where I want to run the script. Does anyone know any useful functions to do this? Thank you,



~Josh Fletcher


Top
 Profile  
 PostPosted: Wed Nov 09, 2011 8:03 pm   
User avatar

Joined: Wed Jun 08, 2011 8:27 am
Posts: 189
Location: outer Shpongolia
I don't know Mac OS X... but I found the command sw_vers(1).
I think that what you're searching for is the output of:
Code:
sw_vers -productVersion


Not sure if it helps.


Top
 Profile  
 PostPosted: Wed Nov 09, 2011 10:06 pm   

Joined: Sun Jul 17, 2011 4:21 pm
Posts: 6
Awesome, thank you so much, this is exactly what I was looking for. Any chance this function would work on linux too?


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP