delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/04/06/08:36:04

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B8AC63858431
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1680784518;
bh=yt/sAtrtdaPOMSiKbMJaBaCB6HzEe/lJywPCjIarip4=;
h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=xSnRAZ4z8J4hRJTqLEdLXVvGOnqk2EmX0mguLsutK/lH39wfmVmczximlzym3OduY
kyfaUXVm4a4je+HViFmwM+oMlZYX/c+lT8xi0yr852ZcFrizrCGJOWLPQgxfCDmBFO
DLCU99F2x26gcKWycQMMESjyYxIX6juz+CRsZGYk=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 673233858D28
X-Yandex-Fwd: 1
Date: Thu, 6 Apr 2023 15:21:14 +0300
X-Mailer: The Bat! (v9.3.4) Professional
Message-ID: <44687390.20230406152114@yandex.ru>
To: Fergus Daly <fergusd84 AT outlook DOT com>, cygwin AT cygwin DOT com
Subject: Re: bash shell script: recently running, now failing
In-Reply-To: <DB6P18901MB005559D81FD4125B0D6DAA07A4919@DB6P18901MB0055.EURP189.PROD.OUTLOOK.COM>
References: <DB6P18901MB005559D81FD4125B0D6DAA07A4919 AT DB6P18901MB0055 DOT EURP189 DOT PROD DOT OUTLOOK DOT COM>
MIME-Version: 1.0
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_THEBAT,
NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Andrey Repin via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Andrey Repin <anrdaemon AT yandex DOT ru>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

------------0B21A80E01F925680
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Greetings, Fergus Daly!

> I have a "hash bang" bash shell script i.e. first line
> #! /bin/sh
> or equivalently
> #! /bin/bash

By default, sh is bash in base Cygwin installation.

> Q3 - at 1/8 the size of bash and sh, I am not at all sure of the role and reach of dash.
> Should the edit (dash replacing bash/sh) be incorporated elsewhere or would this be a
> bad idea (and retained only locally in what is indeed an eccentric and one-off context)?

I'm replacing /bin/sh with dash as I've found that even in POSIX mode, bash
allows for a lot of bash'izms in scripts, which would not otherwise run under
(d?a)?sh.

See the post-install script attached.


-- 
With best regards,
Andrey Repin
Thursday, April 6, 2023 15:18:19

Sorry for my terrible english...
------------0B21A80E01F925680
Content-Type: application/octet-stream;
 name="zp_dash-as-bin-sh.dash"
Content-transfer-encoding: base64
Content-Disposition: attachment;
 filename="zp_dash-as-bin-sh.dash"

IyEvYmluL2Rhc2gKClsgLWYgL2Jpbi9kYXNoLmV4ZSBdIHx8IGV4aXQKCl9mPSIkKG1rdGVt
cCAvYmluL3NoLnByZWxpbmsuWFhYWFhYKSIKClsgLUwgL2Jpbi9zaC5leGUgXSB8fCBtdiAv
YmluL3NoLmV4ZSAiJF9mIgoKbG4gLWZzVCAvYmluL2Rhc2guZXhlIC9iaW4vc2guZXhlCmlm
IFsgJD8gLWd0IDAgXTsgdGhlbgogICAgZWNobyAiR290IGEgcHJvYmxlbSBjcmVhdGluZyBs
aW5rIGZvciAvYmluL3NoICEiID4mMgogICAgZXhpdCAxCmVsc2UKICAgIHJtICIkX2YiCmZp
CgpleGl0IDAK
------------0B21A80E01F925680
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

------------0B21A80E01F925680--

- Raw text -


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