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: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 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: =?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 AT cygwin DOT com References: From: cyg Simple Message-ID: 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: 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