ganilmohan has asked for the wisdom of the Perl Monks concerning the following question:

Hi, Whats the command to print the Operating System? Am working on Solaris, may I know whatz the command to print the current operating system.?

Replies are listed 'Best First'.
Re: Current Operating System
by Khen1950fx (Canon) on Aug 07, 2008 at 05:11 UTC
Re: Current Operating System
by Lawliet (Curate) on Aug 07, 2008 at 05:03 UTC
    print $^O;

    I am not sure how to print the distro though, if that is what you meant.

    <(^.^-<) <(-^.^<) <(-^.^-)> (>^.^-)> (>-^.^)>
      Hello,

      FYI... do be aware of the "pitfall" of $^0, i.e. it's the architecture that copy of perl was built on, not necessarily what you're running on. See Re: OS400 Pace - architecture?

      regexes


      -------------------------
      Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination are omnipotent. The slogan "press on" has solved and always will solve the problems of the human race.
      -- Calvin Coolidge, 30th President of the USA.
      Thanks. It displays only the OS. Can I get the information along with the version as well?
        Can I get the information along with the version as well?

        If you know that you are on Solaris (as opposed to, say, Windoze), you could shell out and do a uname -r

        -- 
        Ronald Fischer <ynnor@mm.st>
Re: Current Operating System
by davorg (Chancellor) on Aug 07, 2008 at 08:58 UTC
A reply falls below the community's threshold of quality. You may see it by logging in.