Re: determine operating system
> have you checked the man page for uname?[color=blue]
> uname -a: returns all avaialble info for the given machine/OS.[/color]
I just looked at the manpages for uname and I tried "uname -sr".
However, I was a little surprised by the result, since it printed
"SunOS 5.8" and the comments that appear when I log in remotely
to the server say that it runs Solaris 8. (If those two are the same,
please tell me)
And another thing: how can I call this from our C++ code?
I suppose using the system() function. But then, how can I get the
result that this function prints?
Kevin
"Joe Cipale" <joec@aracnet.c om> schreef in bericht
news:40A02504.B A30458F@aracnet .com...[color=blue]
> Kevin A wrote:[color=green]
> >
> > Hi,
> > Is there a way to determine the name and version of the
> > operating system in a portable way? (for Solaris/Linux)
> >
> > Thanks,
> >
> > Kevin[/color]
>
> have you checked the man page for uname?
> uname -a: returns all avaialble info for the given machine/OS.
>
> Take a look at uname.
> --
> #----------------------------------------------------------#
> # Penguinix Consulting #
> #----------------------------------------------------------#
> # Software development, QA and testing. #
> # Linux support and training. #
> # "Don't fear the penguin!" #
> #----------------------------------------------------------#
> # Registered Linux user: #309247 http://counter.li.org #
> #----------------------------------------------------------#[/color]
> have you checked the man page for uname?[color=blue]
> uname -a: returns all avaialble info for the given machine/OS.[/color]
I just looked at the manpages for uname and I tried "uname -sr".
However, I was a little surprised by the result, since it printed
"SunOS 5.8" and the comments that appear when I log in remotely
to the server say that it runs Solaris 8. (If those two are the same,
please tell me)
And another thing: how can I call this from our C++ code?
I suppose using the system() function. But then, how can I get the
result that this function prints?
Kevin
"Joe Cipale" <joec@aracnet.c om> schreef in bericht
news:40A02504.B A30458F@aracnet .com...[color=blue]
> Kevin A wrote:[color=green]
> >
> > Hi,
> > Is there a way to determine the name and version of the
> > operating system in a portable way? (for Solaris/Linux)
> >
> > Thanks,
> >
> > Kevin[/color]
>
> have you checked the man page for uname?
> uname -a: returns all avaialble info for the given machine/OS.
>
> Take a look at uname.
> --
> #----------------------------------------------------------#
> # Penguinix Consulting #
> #----------------------------------------------------------#
> # Software development, QA and testing. #
> # Linux support and training. #
> # "Don't fear the penguin!" #
> #----------------------------------------------------------#
> # Registered Linux user: #309247 http://counter.li.org #
> #----------------------------------------------------------#[/color]
Comment