Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Determining OS

0 views
Skip to first unread message

Steve

unread,
Jul 23, 2008, 11:34:22 AM7/23/08
to
Hello,

I have a series of functions that will be deployed on a number of
different machines which may be running Windows, Linux or MacOS. I
need to run a couple of system calls, which will have to change based
on the OS.

Is there a simple function somewhere that returns the OS of the
current local environment? The only way I can think of doing it is to
do a "pwd" and check if the first character is a letter or a slash.
Perhaps there is a more clever option out there...

Thanks in advance,

-Steve

Bruno Luong

unread,
Jul 23, 2008, 11:56:01 AM7/23/08
to
Steve <stev...@gmail.com> wrote in message
<334b557e-89cd-49f7...@u36g2000pro.googlegroups.com>...

>
> Is there a simple function somewhere that returns the OS
of the
> current local environment?

doc computer

Bruno

Steve

unread,
Jul 23, 2008, 12:34:57 PM7/23/08
to
Excellent, thanks!

For the record, the doc page has the functions 'computer', which
returns a string, and the if..then friendly 'ispc', 'ismac', 'isunix'
as well. Thanks for prompt reply!

-Steve


n Jul 23, 9:56 am, "Bruno Luong" <b.lu...@fogale.fr> wrote:
> Steve <stevem...@gmail.com> wrote in message
>
> <334b557e-89cd-49f7-b163-b571f25b5...@u36g2000pro.googlegroups.com>...

0 new messages