delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/12/01/18:52:53

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: "H. S." <hs DOT samix AT gmail DOT com>
Subject: Re: how to detect if Windows or Linux is running?
Date: Thu, 01 Dec 2005 18:39:17 -0500
Lines: 25
Message-ID: <dmo1j6$qup$2@sea.gmane.org>
References: <31DDB7BE4BF41D4888D41709C476B6570246A86E AT NIHCESMLBX5 DOT nih DOT gov> <dmnuns$iea$1 AT sea DOT gmane DOT org> <438F83B3 DOT 23BA2ACF AT dessent DOT net>
Mime-Version: 1.0
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
In-Reply-To: <438F83B3.23BA2ACF@dessent.net>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

Brian Dessent wrote:
> "H. S." wrote:
> 
> 
>>er .. how can I do that using SSH and non-interactively?
> 
> 
> The same way you'd run any ssh command?
> 
> if ssh host uname \| grep -q CYGWIN; then
> 	echo "it's running cygwin";
> else
> 	echo "it's not running cygwin";
> fi
> 

I was just now thinking about this. I just finished using "ssh host > 
out.dat" to debug why my rsync was not working. This made me think to 
use a command to know the OS for my purpose and while thinking about 
that read your mail!

Thanks for your suggestion,
->HS




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019