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 User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: Cygwin ML CC: Fergus Subject: Distinguishing between XP / Vista / 7 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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