Skip to content

Instantly share code, notes, and snippets.

@knight-of-ni
Created February 15, 2016 14:04
Show Gist options
  • Save knight-of-ni/963617fe4bd236c75769 to your computer and use it in GitHub Desktop.
Save knight-of-ni/963617fe4bd236c75769 to your computer and use it in GitHub Desktop.
perl -e 'use POSIX qw(uname); my @uname = uname(); foreach (@uname) { print $_,"\n"; }'
@pliablepixels
Copy link

Mac

$ perl -e 'use POSIX qw(uname); my @uname = uname(); foreach (@uname) { print $_,"\n"; }'
Darwin
PP-MacBook-Pro.local
14.5.0
Darwin Kernel Version 14.5.0: Tue Sep 1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64
x86_64

Supplementary data: Output of sw_vers on a mac:

$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.10.5
BuildVersion: 14F1605

@knight-of-ni
Copy link
Author

CentOS 6

[abauer@airborne24adf2 dev]$ ./uname.pl
Linux
airborne24adf2.techengnet.local
2.6.32-573.12.1.el6.x86_64
#1 SMP Tue Dec 15 21:19:08 UTC 2015

x86_64

@knight-of-ni
Copy link
Author

OmniOS/SunOS

abauer@vOmniOS:/home/abauer$ perl -e 'use POSIX qw(uname); my @uname = uname();
foreach (@uname) { print $_,"\n"; }'
SunOS
vOmniOS
5.11
omnios-f090f73
i86pc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment