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:to:subject:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=EFW0 Q2Ervr1q9TdfOYkc8BC3GztzqNHDUW0NLdDq2kCx29ro6BAGmpO06UPJE4X9rtBI CeBJzU1sh+RbkVFTDmUgZtNkfXDOKBzVk3tsK9Ec87RKBZOc6XyEKSNnfOFaSs9w 02AiaMXQr0PK5nYooSnMwAn8vG0nB3PvCppqiHY= 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:to:subject:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=KF2kc8MaPA VWenHxhCG7tcQqy6k=; b=LEUas2km1VPho+TskgAfTwbQN4bebV9TbS8fFQ/OCk lg1lrDAA6D95G1p1cyZuhaIOWms/k0Y42c6GiZ/q9hnf5mf9jtQnMP6FqZhUFnir U4hf8/RcYo3sYtWob6iSaY0YHHZA1WipfQfgvSK+ofuQIsYemlpqqSpc+wqullZh Y= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy=H*F:D*net.au, Hx-languages-length:1926, worldwide, H*M:local X-HELO: mail106.syd.optusnet.com.au Date: Tue, 28 Feb 2017 10:12:47 +1100 From: Duncan Roe To: cygwin AT cygwin DOT com Subject: Re: [ANNOUNCEMENT] Updated: dash-0.5.9.1-1 Message-ID: <20170227231247.GA19383@dimstar.local.net> Mail-Followup-To: cygwin AT cygwin DOT com References: <58b1ba27 DOT d603ca0a DOT b7fcf DOT 8e60 AT mx DOT google DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <58b1ba27.d603ca0a.b7fcf.8e60@mx.google.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=VbSHBBh9 c=1 sm=1 tr=0 a=/xIuaNGu1NPzt0yKkvdCVQ==:117 a=/xIuaNGu1NPzt0yKkvdCVQ==:17 a=eIhxMilvRf8A:10 a=kj9zAlcOel0A:10 a=n2v9WMKugxEA:10 a=uZvujYp8AAAA:8 a=UtBZpAuDPcDGnmJ6pc0A:9 a=CjuIK1q_8ugA:10 a=skkvawx15b0A:10 a=SLzB8X_8jTLwj6mN0q5r:22 X-IsSubscribed: yes On Sat, Feb 25, 2017 at 09:08:55AM -0800, Steven Penny wrote: > On Sat, 25 Feb 2017 11:46:08, cyg Simple wrote: > > If *your* script has a dependency to run using *dash* instead of *sh* > > then you _must_ use #!/bin/dash anyway. > > I think you have a fundamental misunderstanding of what Dash is. Dash is a > minimal shell, similar to the "sh" defined by POSIX: > > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html > > So saying "a dependency to run using *dash*" makes about as much sense as saying > "Cygwin has a dependency to run using Cygwin". > > > And what I _*I*_ don't want dash as /bin/sh? You see not everyone in the > > community will agree. > > With respect to the community, yes of course you get a say. If the community > doesn???t agree on this we will continue to use Bash. However you do not get a say > with respect to the standard. The POSIX standard specified that /bin/sh is the > shell I have linked above. Bash is a superset of that, so by definition those > extra features are not defined or guaranteed to exist. When writing /bin/sh > scripts, you should be assuming the users /bin/sh only has those features > defined by POSIX. Example: > > #!/bin/bash -> script that follows might have Bashisms > #!/bin/dash -> script that follows might have Dashisms (echo -n, local) > #!/bin/sh -> script that follows should be a POSIX script > > > You can make the suggestion to those using your script to do so otherwise but > > forcing dash as /bin/sh worldwide isn't something you can actually do. > > Yes we certainly can. Debian and Ubuntu have already done this. > "we" being you and who else? /bin/sh has been bash for a long time and I would prefer it stays that way. OTOH, I have started prefacing scripts with /bin/bash -p to be on the safe side. "-p" stops bash from importing functions from the environment BTW Cheers ... Duncan. -- 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