delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/02/25/12:09:14

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:message-id:date:from:subject:to:references
:content-type; q=dns; s=default; b=YFECujlnCKqHYkoaj3VOJ1F18mV6n
NJv3+OdRBQSytKpnJeD7lRYvkwXA+nd9YlbvYvQGgzr5qOxzabPMj6TrFvJyFvW6
DcQzzepGZYGsNun80gRUrGmvj7iQvNq7Uz/lGFPp9QrfBklUNRE5hYYj3gw8C9gH
oA2ULyQMqZE8B8=
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:message-id:date:from:subject:to:references
:content-type; s=default; bh=X3XD/ylFXDjyt0JKCYOcxNp9uP4=; b=wce
1eCbiqeo4yxVix3Kz0kgzKFrCfPG4iNHdWTXRpzqOR/PkOregQqZdgWhze/2QU5p
Sv6VEwd9w3eQdhGAXG1K6ANzB3o0dQ59PzXgAz9rvj9D+cndC1uOyHhIKPvGz0p2
xG0HjOxmpts2hzfs6iXB8h0wEMUAqYOYgiDxRqn8=
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=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=H*MI:sk:ed82804, 9699919799, pubs.opengroup.org, pubsopengrouporg
X-HELO: mail-oi0-f54.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:subject:to:references :user-agent; bh=k+qIv3aiyyh6GoTx4WodNhhQigYerF+KBhszPxGsVWY=; b=SZ3oL1Ej4eJsajKLH5s1tVSzBYMrVLsUwgO5xVuW6hkI7opddTCl3yl3abP+siyBRa cLQamcrXC5qCFm1/jSZ4nTWdgbLy8I8oHMBDkec+LrzC0+PhZL1IY4dmZ0caCDoKFxcG hRGSwhGjD1grkLbfsJTrK445A+2uErz8/dUEXLkV5IAZ3xgryqm3lfa0m6ISdyQfJqIg 2fDv4YOT79Xpji9F8GaHbrDMwroSXIpu8EcqRN/F/gpkY1/zuRXhDGU3gSECTO1z4FDN UCY5tFnxGvHMlh4NUghAPtRpvr3iGzciZp9ABdy6FMFbZNgDl4NuibejJV43lo+/9EvS OsfQ==
X-Gm-Message-State: AMke39kdusK+s6WDtY1SeAks4glZYmoaFQxPhAG5Hi0+R7RVJdBskjKzdPEI7IE2zqUn6g==
X-Received: by 10.202.194.137 with SMTP id s131mr3900571oif.140.1488042535843; Sat, 25 Feb 2017 09:08:55 -0800 (PST)
Message-ID: <58b1ba27.d603ca0a.b7fcf.8e60@mx.google.com>
Date: Sat, 25 Feb 2017 09:08:55 -0800 (PST)
From: Steven Penny <svnpenn AT gmail DOT com>
X-Google-Original-From: Steven Penny
Subject: Re: [ANNOUNCEMENT] Updated: dash-0.5.9.1-1
To: cygwin AT cygwin DOT com
References: <ed828046-15d2-6cbe-4e48-c3d72839572e AT gmail DOT com>
User-Agent: Tryst/2.0.1 (github.com/svnpenn/tryst)

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.


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