From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ralph Alvy Subject: Re: Syntax error: Bad substitution Date: Sun, 29 Oct 2006 09:08:14 -0800 Message-ID: References: <20061028225657.GA18195@bluesong.van.maves.ca> <20061029004107.GA8494@bluesong.van.maves.ca> Mime-Version: 1.0 Content-Transfer-Encoding: 7Bit Return-path: Sender: linux-msdos-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="us-ascii" To: linux-msdos@vger.kernel.org Bart Oldeman wrote: > On 10/29/06, Matthew Clarke wrote: >> Sat, Oct 28, 2006 at 05:14:55PM -0700, Ralph Alvy may have written: >> >> > 84 -install) >> > 85 INSTALL=1 >> > 86 if [ -n "$2" -a "${2:0:1}" != "-" ]; then >> > 87 PROPRIETARY=$2 >> >> If bash is installed as /bin/bash, you can change the first line of the >> script to >> >> #! /bin/bash >> >> to avoid the problem. > > You could also replace line 86 by: > if [ -n "$2" -a -n "${2%%-*}" ]; then > which is portable to Bourne sh AFAIK (and a better solution for dosemu > itself -- some distributions don't like /bin/bash scripts). Well, for me anyway, I think it's easier to remember to change the first line to #! /bin/bash whenever I see this problem arise, which is so rare to begin with (only one disribution so far, among so many installed).