From: Ralph Alvy <ralph@ralphalvy.com>
To: linux-msdos@vger.kernel.org
Subject: Re: Syntax error: Bad substitution
Date: Sat, 28 Oct 2006 18:17:43 -0700 [thread overview]
Message-ID: <ei0vfm$a08$1@sea.gmane.org> (raw)
In-Reply-To: 20061029004107.GA8494@bluesong.van.maves.ca
Matthew Clarke wrote:
> Sat, Oct 28, 2006 at 05:14:55PM -0700, Ralph Alvy may have written:
>
>> Matthew Clarke wrote:
>>
>> > Fri, Oct 27, 2006 at 08:32:32PM -0700, Ralph Alvy may have written:
>> >
>> >> I'm getting the following error when running dosemu 1.2.2 under a
>> >> newly installed Kubuntu 6.10:
>> >>
>> >> ./xdosemu: 86: Syntax error: Bad substitution
>> >>
>> >> What might be going on here?
>
> [ snip ]
>
>> 84 -install)
>> 85 INSTALL=1
>> 86 if [ -n "$2" -a "${2:0:1}" != "-" ]; then
>> 87 PROPRIETARY=$2
>
> Line 1 of the script says "#! /bin/sh", which implies that the code in the
> script is written in the syntax understood by the Bourne shell. However,
> ${2:0:1} is syntax for the GNU Bourne-again shell (AKA bash), not the
> Bourne shell. My guess is that your other distributions make /bin/sh a
> symbolic link to /bin/bash, but that Kubuntu 6.10 points /bin/sh to some
> other shell that understands Bourne shell syntax but not bash syntax, so
> the other systems hide this error in the script but Kubuntu 6.10 doesn't.
>
> If bash is installed as /bin/bash, you can change the first line of the
> script to
>
> #! /bin/bash
>
> to avoid the problem.
>
> Matt.
Thanks, Matt. This solved it nicely.
next prev parent reply other threads:[~2006-10-29 1:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-28 3:32 Syntax error: Bad substitution Ralph Alvy
2006-10-28 6:22 ` Ralph Alvy
2006-10-28 16:57 ` Ralph Alvy
2006-10-28 22:56 ` Matthew Clarke
2006-10-29 0:14 ` Ralph Alvy
2006-10-29 0:41 ` Matthew Clarke
2006-10-29 1:17 ` Ralph Alvy [this message]
2006-10-29 10:26 ` Bart Oldeman
2006-10-29 17:08 ` Ralph Alvy
2006-10-29 17:24 ` Ralph Alvy
2006-10-30 11:08 ` Cristi Mitrana
2006-10-30 21:14 ` Ralph Alvy
2006-11-01 6:44 ` Cristi Mitrana
2006-11-01 18:01 ` Mike McCarty
2006-11-08 16:23 ` Ralph Alvy
2006-11-08 18:28 ` Bart Oldeman
2006-11-08 20:07 ` Ralph Alvy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='ei0vfm$a08$1@sea.gmane.org' \
--to=ralph@ralphalvy.com \
--cc=linux-msdos@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox