delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-1.6 required=5.0 tests=AWL,BAYES_00 |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4AA78845.2080205@bonhard.uklinux.net> |
Date: | Wed, 09 Sep 2009 11:49:41 +0100 |
From: | Fergus <fergus AT bonhard DOT uklinux DOT net> |
User-Agent: | Thunderbird 2.0.0.22 (Windows/20090605) |
MIME-Version: | 1.0 |
To: | Cygwin ML <cygwin AT cygwin DOT com> |
CC: | Fergus <fergus AT bonhard DOT uklinux DOT net> |
Subject: | Distinguishing between XP / Vista / 7 |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
To distinguish the host OS (XP or Vista) for an application I have used #! /bin/bash case `uname` in *NT-5*) OS_VER=XP ;; *NT-6*) OS_VER=Vista ;; esac echo $OS_VER Now I find I need to distinguish between Vista and 7 but uname does not provide a discriminant (CYGWIN_NT-6.1 in both cases, I think?). Can anybody suggest how to do this, please? Thank you. Fergus PS Can anybody running 98 with Cygwin [1.5] tell me what uname gives them? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |