need a good way to determine the OS from a BASH script

Digimer linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Tue Mar 22 15:15:39 UTC 2011


On 03/22/2011 11:07 AM, Vic Gedris wrote:
> "uname" is your friend for this.
> 
> $ uname
> Linux
> 
> $ uname
> SunOS
> 
> ..etc..  Not sure what it reports for MacOS...

OS X returns the name of the OS X release (ie: Darwin), and no
/etc/issue exists. Look into /etc/lsb_release (man 1 lsb_release).

-- 
Digimer
E-Mail: digimer-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
AN!Whitepapers: http://alteeve.com
Node Assassin:  http://nodeassassin.org
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list