Don't know how to get OS infomation

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
csfreebird
Posts: 107
Joined: Tue Jan 15, 2013 11:54 am
Location: China, Beijing
Contact:

Don't know how to get OS infomation

Post by csfreebird »

I read the document for sys-info, and try it in my Ubuntu 12.10 AMD64bit environment.
The following is what I got:
> (sys-info)
(510 576460752303423488 411 1 0 2048 0 5350 10406 1409)
> (sys-info 9)
1409

1409 means what?
How to check my OS is windows or Linux?

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Re: Don't know how to get OS infomation

Post by cormullion »

Perhaps:

Code: Select all

(case 
 ostype 
 ("Win32"  (println  "windows"))
 ("Linux"  (println  "penguins"))
 ("OSX"    (println  "big cats")))
Or do you want to know more than that?

csfreebird
Posts: 107
Joined: Tue Jan 15, 2013 11:54 am
Location: China, Beijing
Contact:

Re: Don't know how to get OS infomation

Post by csfreebird »

Thank you. I will use it for now.
It would be better if I could know the exact OS name,e.g. Ubuntu or Windows 7.

Locked