delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/02/15/13:50:36

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=USoZ7SDI/iz1JRyS
7jVsUAVdwjQYNGXVI76VR+Fi20dGpLfdvwF7s9Rf8oxHlveyOp5f8dt23QtS22ph
gvGfJjJf/wkppJVyRVHDoVl6z/3MHcW6kLWs2GDPyumlA/X4hXqSLym4yLJabRLP
Xx/7TSVTO38IIVC4SOZrNtVMyGQ=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=93YSOmMBfjxz+7HvZI6A+X
LVsis=; b=b8R3iIMdOTDua7ev6rAO6aiiXYk1Wyb1bukpl0kw9iMw8z94fwV1xN
3t/KYV3Lokp9DuD+1jZDOG0YjiXAKZWWDOKHIIaiTKqXHe9LHNwsawfX0oxmSFFU
o9HiAfGrtDJ0AH2P+gF6BIAa5otosz1HyEyN2uKERWNIU0+MBrRBE=
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
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=english, HX-Priority:Normal, yandexru, UD:yandex.ru
X-HELO: forward102p.mail.yandex.net
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1550256601; bh=VTpi1jfvOUXMgUcSoZJQH7DYIHzYlb7A0jpth1/1X8c=; h=Date:From:Reply-To:Message-ID:To:Subject:In-Reply-To:References; b=o49M2a9kVcoVzjk2wX782Yc+dYZ3UYjMqU5d1NUzV78qfjVFtM5txHcBIjBHCtheW c2IrOG6Gu8xLf2qFYhVHGDnaVcZY9PlrjGfkV0O5a09Rq1Q5IWR3MjTAqsytd0Nwi+ tZMdMlPO257L4igQ7hfwiZRtrT6ioESkfSIcPtPk=
Authentication-Results: mxback23g.mail.yandex.net; dkim=pass header.i=@yandex.ru
Date: Fri, 15 Feb 2019 21:35:42 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <1787080198.20190215213542@yandex.ru>
To: Michael Haubenwallner <michael DOT haubenwallner AT ssi-schaefer DOT com>,
cygwin AT cygwin DOT com
Subject: Re: portable use of dos2unix WAS: Re: textmode for stdout, what is "correct" now?
In-Reply-To: <d59689ee-4bf3-d66f-ca0b-f9cec8dda035@ssi-schaefer.com>
References: <739ed5ce-6902-d702-e152-65dc2c1da667 AT ssi-schaefer DOT com> <20190214162002 DOT GA4950 AT calimero DOT vinschen DOT de> <6aa280c2-4769-0772-91d9-c73a3a3d9680 AT ssi-schaefer DOT com> <20190215102251 DOT GA2702 AT calimero DOT vinschen DOT de> <f7345109-5b22-a342-df1e-940e236c2397 AT ssi-schaefer DOT com> <1282767785 DOT 20190215154502 AT yandex DOT ru> <d59689ee-4bf3-d66f-ca0b-f9cec8dda035 AT ssi-schaefer DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes

Greetings, Michael Haubenwallner!

> On 2/15/19 1:45 PM, Andrey Repin wrote:
>> Greetings, Michael Haubenwallner!
>> 
>>>>
>>>> For scripting, d2u should help.
>> 
>>> Plus, to be portable: type d2u >/dev/null 2>&1 || d2u() { cat; }
>> 
>> _d2u="$( which d2u 2> /dev/null || echo cat )"

> To be honest, this is less portable for some reasons:

> * "$(...)" is not Bourne Shell (/bin/sh) but POSIX Shell (ksh, bash, ...)

And /bin/sh is a POSIX shell. I don't know what you are trying to say here.
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html#tag_20_117
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_03

> * "which" is C Shell and has it's own troubles (may load ~/.cshrc first)

$ which which
/bin/which

It's a separate executable, unless shell provides an override.
How it could possible load foreign RC file is beyond me.

----

I have a different question though. The commands you presented in the OP
look like you aren't using Cygwin-suppied OpenSSL binary.


-- 
With best regards,
Andrey Repin
Friday, February 15, 2019 21:28:57

Sorry for my terrible english...


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

- Raw text -


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