Re: Syntax error: Bad substitution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bart Oldeman wrote:

> On 10/29/06, Matthew Clarke <clamat@xxxxxxxxx> 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).

-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Console]     [Linux Audio]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Camping]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Samba]     [Linux Media]     [Fedora Users]

  Powered by Linux