perl - How can I check if the Mac OS is in 32 bit or 64 bit? -


i want determine if mac os in 32 bit or 64 bit.

who can write down perl script me?

you can check output of uname -a , see if says i386 or x86_64 on end:

#! /usr/bin/env perl  use strict; use warnings; use feature qw(say); no warnings qw(uninitialized);  if (not -x "/usr/bin/uname") {     "can't determine system bit mode: uname command not found"; } else {     chomp ( $arch_type = qx(/usr/bin/uname -a) );     if (not $arch_type) {         "can't determine system bit mode";     }     elsif ($arch_type =~ /x86_64$/) {         "system in 64 bit mode";     }     else {         "system in 32 bit mode: $arch_type";     } } 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -