Bash script array error on Shibby FW108?

Discussion in 'Tomato Firmware' started by leandroong, Apr 4, 2013.

  1. leandroong

    leandroong LI Guru Member

    sample script:
    #! /bin/sh
    Unix[1]='Red hat'

    echo ${Unix[1]}

    root@BTRouter2:/tmp# sh line 2: Unix[0]=Debian: not found line 3: Unix[1]=Red hat: not found line 4: Unix[2]=Ubuntu: not found line 5: Unix[3]=Suse: not found line 7: syntax error: bad substitution

    Any idea?
  2. phuque99

    phuque99 LI Guru Member

    Busybox's ash shell does not support bash styled array.
    koitsu likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice