how to detect if Windows or Linux is running?

H. S. hs.samix@gmail.com
Thu Dec 1 23:52:00 GMT 2005


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/



More information about the Cygwin mailing list