X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: "H. S." <hs.samix@gmail.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@NIHCESMLBX5.nih.gov> <dmnuns$iea$1@sea.gmane.org> <438F83B3.23BA2ACF@dessent.net>
Mime-Version:  1.0
Content-Type:  text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding:  7bit
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
In-Reply-To: <438F83B3.23BA2ACF@dessent.net>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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/

