delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/03/07/10:25:49

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,TRACKER_ID
X-Spam-Check-By: sourceware.org
Message-ID: <49B291E0.5090200@cwilson.fastmail.fm>
Date: Sat, 07 Mar 2009 10:25:20 -0500
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Info about OS by command in Cygwin
References: <gobb1o$6li$1 AT ger DOT gmane DOT org> <49A93341 DOT 7040809 AT t-online DOT de> <49A98766 DOT 3060601 AT cwilson DOT fastmail DOT fm> <gotonj$imi$1 AT ger DOT gmane DOT org>
In-Reply-To: <gotonj$imi$1@ger.gmane.org>
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

Thomas Wiedmann wrote:
>> Also, /usr/lib/csih/winProductName.exe (Note that this is technically a
>> native, not cygwin, application, so you need to strip '\r' from the
>> result if you're using it in a script).
> 
> What does the subdirectory csih stand for, i. e. what means this
> abbreviation?

cygwin-service-installation-helper

But a short investigation would have revealed it:

$ cygcheck -f /usr/lib/csih/winProductName.exe
csih-0.1.8-1

$ cygcheck -l csih
/usr/lib/csih/getAccountName.exe
/usr/lib/csih/getVolInfo.exe
/usr/lib/csih/winProductName.exe
/usr/share/csih/cygwin-service-installation-helper.sh
/usr/share/doc/csih-0.1.8/AUTHORS
/usr/share/doc/csih-0.1.8/ChangeLog
/usr/share/doc/csih-0.1.8/COPYING
/usr/share/doc/csih-0.1.8/NEWS
/usr/share/doc/Cygwin/csih-0.1.8.README

Oh, look: one of these files stands out:
/usr/share/csih/cygwin-service-installation-helper.sh

C. S. I. H.

> How to strip '\r' from the result for using it in a script?

myvar=`/usr/lib/csih/winProductName.exe | tr -d '\15'`

is probably the simplest.

--
Chuck

--
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