#10 line 244: "1": syntax error: operand expected (error token i

closed
nobody
None
5
2006-09-14
2006-02-26
Anonymous
No

I get this error when trying to run any2dvd on my
computer. I'm running Ubuntu 6.04 Dapper (Development
version, last updated 27/2/06). the directory
'tmp_any2dvd' is created in the working directory, but
there's nothing in it and that's as far as the program
gets before exiting with this error.

----------
$ any2dvd video.mkv

Any2Dvd-0.30
/usr/local/bin/any2dvd: line 244: "1": syntax error:
operand expected (error token is ""1"")
----------

Discussion

  • anton
    anton
    2006-03-10

    Logged In: YES
    user_id=1468751

    The following patch fixes this, at least with debian
    unstable which should work for Ubuntu Dapper as well:

    --- any2vob 2006-03-10 23:55:44.000000000 +1100
    +++ any2vob.ajw 2006-01-14 20:22:40.000000000 +1100
    @@ -247,7 +247,7 @@
    ARRAY_NUM="${#TOOLKIT[@]}"
    ARRAY="1"
    while [ "$ARRAY" -le "$ARRAY_NUM" ]; do
    - testprog ${TOOLKIT[$ARRAY]} || exit 0;
    + testprog ${TOOLKIT["$ARRAY"]} || exit 0;
    let ARRAY=$ARRAY+1
    done
    TOOLMSG=([1]=) # Reset
    --- any2dvd 2006-03-10 23:55:44.000000000 +1100
    +++ any2dvd.ajw 2006-03-10 23:58:30.000000000 +1100
    @@ -241,7 +241,7 @@
    ARRAY_NUM="${#TOOLKIT[@]}"
    ARRAY="1"
    while [ "$ARRAY" -le "$ARRAY_NUM" ]; do
    -testprog ${TOOLKIT[$ARRAY]} || exit 0;
    +testprog ${TOOLKIT["$ARRAY"]} || exit 0;
    let ARRAY=$ARRAY+1
    done
    }

     
  • Nyhm
    Nyhm
    2006-06-25

    Logged In: YES
    user_id=1509874

    any2dvd-0.30

    Lines 235 236 244 use array syntax like this:
    ${TOOLKIT["$ARRAY"]}

    I fixed this problem like this (remove extra quotes):
    ${TOOLKIT[$ARRAY]}

    For /bin/sh, I'm using:
    GNU bash, version 3.1.14(1)-release

     
  • Rick
    Rick
    2006-09-14

    • status: open --> closed
     
  • Rick
    Rick
    2006-09-14

    Logged In: YES
    user_id=1269204

    Fixed in 0.32