delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/02/23/12:50:26

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=O0HlcyPcRmBmFab2
+x/m31yrKuzuaBNFSz3eBHNF3nOjBg9/evia9hXNNSIGcwpI19eN7Nwbeymt9TbN
dLgR9uS35tPt6qyiDnSwlyQPWtMI6qEaRGE3WOvIXMmMK2xyFHKKSuHFiRubLnSK
e9jVW9yD75BbOdrYI1Ei8TjPChU=
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=7cHCtPEMiVlophKWhYVoTE
+qe2g=; b=x7QCR6CoVbD6cauR1o9MaCsYJ9Mx3YvqDRMcTk8xcOQqBSyUVEtwrv
NFNM2E3//hPmXZ65xjClY9bteP5FaAn5gNqEuZb1K5BAO/CNix7RjEf10IbrbL2a
zYuVoUqKa+Vi2TSxb//vlNlEa4FN/Opi+jsJbvH/RozSMOo9z47fo=
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-Virus-Found: No
X-Spam-SWARE-Status: No, score=2.1 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=H*UA:Bat!, H*x:Bat!, H*F:D*yandex.ru, penny
X-HELO: forward1h.cmail.yandex.net
Authentication-Results: smtp2h.mail.yandex.net; dkim=pass header.i=@yandex.ru
X-Yandex-Suid-Status: 1 0,1 0
Date: Thu, 23 Feb 2017 20:38:08 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <1835159156.20170223203808@yandex.ru>
To: Steven Penny <svnpenn AT gmail DOT com>, cygwin AT cygwin DOT com
Subject: Re: [ANNOUNCEMENT] Updated: dash-0.5.9.1-1
In-Reply-To: <58ae6311.57a8ca0a.9eea8.6ebb@mx.google.com>
References: <announce DOT 327710ac-2397-1929-0675-978d3fc356f3 AT redhat DOT com> <58ae6311 DOT 57a8ca0a DOT 9eea8 DOT 6ebb AT mx DOT google DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes

Greetings, Steven Penny!

> On Fri, 17 Feb 2017 07:50:34, "Eric Blake (cygwin)" wrote:
>> For now, there are no immediate plans of replacing /bin/sh
>> with dash, but the possibility remains for the future.

> I am a fan of this.

$ cat /etc/postinstall/zp_dash-as-bin-sh.dash
#!/bin/dash

test ! -h /bin/sh.exe && {
  _f="$(mktemp /bin/sh.XXXXXX)"
  {
    mv /bin/sh.exe "$_f"
    ln -s /bin/dash.exe /bin/sh.exe
  } || mv "$_f" /bin/sh.exe
  rm "$_f"
}
exit 0


> Debian does this already, and it would dramatically speed up
> shell scripts:

>     $ cat alfa.sh
>     x=400000
>     until [ "$((x -= 1))" = 0 ]
>     do :
>     done

>     $ time bash alfa.sh
>     real    0m5.735s

>     $ time dash alfa.sh
>     real    0m1.112s

> Dash can handle large scripts; I am already using it with one (545 SLOC):

> http://github.com/svnpenn/sage/blob/master/sage


-- 
With best regards,
Andrey Repin
Thursday, February 23, 2017 20:36:35

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