X-Recipient: archive-cygwin@delorie.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:subject:to:references:from:message-id:date
	:mime-version:in-reply-to:content-type
	:content-transfer-encoding; q=dns; s=default; b=FZmW/10cr1w4kZLe
	hMr5ui+Z4o0zXBHlFyh0sWm5YngJW64Fe0nYTBcJApszCZXiIkArBY6+PBWaISQy
	/3DY8p/6804D6srl5HbdeZHBkxz49tQ+/PMPjFs0XNr5T2f91KC+17gnslQtt0Vl
	jNOoiMzvg4aZIjr8hgjg/cLZVhs=
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:subject:to:references:from:message-id:date
	:mime-version:in-reply-to:content-type
	:content-transfer-encoding; s=default; bh=cdE+GKyjs0A606pjuLZhqM
	INqGc=; b=LQlkkbpv5zSmdeUqbDlBOi+ScsApw8h89ZrRZTSPocMLw0pZDTqETz
	LnXLegxvss46o4TvoQnvPLsRR6+7wi9DWhjBE4HnDOX8kPedDqNVddGtQe0gYvHZ
	LijDb/ZQqNNzMV0wHLxTFB+cQ8sl45lG3tcKQY0F0iffWhMrFUsfE=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-0.8 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=kjrulff, Kjrulff, Kj=c3=a6rulff, kj=c3=a6rulff?=
X-HELO: mail-it0-f41.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=1e100.net; s=20130820;        h=x-gm-message-state:subject:to:references:from:message-id:date         :user-agent:mime-version:in-reply-to:content-transfer-encoding;        bh=3QiK0cVmvHJrgtelPY2YAoxM6++G6Bs63wTi8qI7dqg=;        b=nB1y6hhyvmsBKKBsmabBTXzliNYICj+A+eae50HO2MpUJcJQ8avx2H0aXZZRqc48Ms         4iuqwDoV7V8iPzYxbKBdkRluHCpvmlqk/gn7731AeprSyGmzl04n3BKKwtd7frVZhMZj         vlD8dr1p4cHkDfIDq8bgc6+PPYG76oRgrBNi/Fz2pM7TpyRu/4Mv5JrNIFzdlDavhnif         0ASNnHB+M5Z2Yq6LkKhTn06pHT27iyF1uhc77Xox1x+ymp6+wBnQq28KZnpNKBGhYIKU         PsPGhtDiYte6sEjLdIH/93mPe+NFCZC7QvRw+sjKXTq4O0zcOOJtEO3Du0XEc3rH7JK8         QhHg==
X-Gm-Message-State: AEkoouskiMinMPudL85IAl9Q+o5xFEgAuK3LhnNcCr1ZihVN/F9W14G9iBdjXvmK1q2QEA==
X-Received: by 10.36.85.195 with SMTP id e186mr20297396itb.56.1471871799119;        Mon, 22 Aug 2016 06:16:39 -0700 (PDT)
Subject: Re: #!/bin/sh and #!/bin/bash is not the same
To: cygwin@cygwin.com
References: <CA+7cx1oHkwK8vOV+2heYAhw=DhkrRfEvkbaj2pmH+x29ZP0T7Q@mail.gmail.com>
From: cyg Simple <cygsimple@gmail.com>
Message-ID: <fd1a102b-9df8-24b7-8440-9842b614fc6c@gmail.com>
Date: Mon, 22 Aug 2016 09:16:50 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
MIME-Version: 1.0
In-Reply-To: <CA+7cx1oHkwK8vOV+2heYAhw=DhkrRfEvkbaj2pmH+x29ZP0T7Q@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-IsSubscribed: yes

On 8/20/2016 1:42 PM, Morten Kjærulff wrote:
> Hi,
> 
> I thought that #!/bin/sh in a script would be a bash, but it seems not
> to be - or what am I doing wrong?
> 

If you want to ensure that you have a particular flavor of shell then
don't use /bin/sh.  The reason to use /bin/sh is that POSIX ensures it
exists but it doesn't have to be bash, even on Linux.  For a generic
shell script use ksh syntax, you'll find that it gets you further and is
supported by bash.

-- 
cyg Simple

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

