Menu

#195 dosemu: 86: Syntax error: Bad substitution

closed
nobody
None
5
2012-11-02
2004-09-09
Anonymous
No

The shell script wrapper for starting dosemu uses a
special feature of the bash shell while it specifies
its interpreter as
"#! /bin/sh".

The line
if [ -n "$2" -a "${2:0:1}" != "-" ]; then ...; else ...; fi

could probably be rewritten to something like

case "$2" in -) former-else-branch ;;
) former-then-branch ;;
esac

That should be portable.

Discussion

  • Jens Moller

    Jens Moller - 2006-12-20

    Logged In: YES
    user_id=1673443
    Originator: NO

    I am running into this problem on Ubuntu. The suggested solution does not tell me enough to address the problem. Is there something I can change in either the bash shell that is installed, or is there any way that the shell file suggestion shown here can include a more complete example fix?

    I'm trying this under dosemu-1.3.3

     
  • Jens Moller

    Jens Moller - 2006-12-20

    Logged In: YES
    user_id=1673443
    Originator: NO

    Ok, If you change the line:

    ! /bin/sh

    to

    ! /bin/bash

    you get past this error.

     
  • Bart Oldeman

    Bart Oldeman - 2006-12-20

    Logged In: YES
    user_id=176505
    Originator: NO

    Was fixed in version 1.3.4.

     

Log in to post a comment.

MongoDB Logo MongoDB