Find the answer to your Linux question:
Results 1 to 3 of 3
Hi I had trid to make a multi array in file.sh in linux fedora shell. but it didn't work. I trid like this: PHP Code: ma =([ "a" "b" "c" ] [ "d" "e" "f" ...
  1. #1
    Just Joined!
    Join Date
    Apr 2008
    Posts
    20

    How to make Multi Array in shell script?

    Hi
    I had trid to make a multi array in file.sh in linux fedora shell.
    but it didn't work.

    I trid like this:
    PHP Code:
    ma=(["a" "b" "c"] ["d" "e" "f"])
    echo ${
    ma[1]} 
    Th result was b
    but i couldn't echo someting like this : ${ma[1][2]}

    Anysuggestion please?

    And by the way, what is the name of this languge?
    it's not a C,C++ or Perl
    So what is it

    Thanks.

  2. #2
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    bash only supports one dimensional arrays.

  3. #3
    Just Joined!
    Join Date
    Apr 2008
    Posts
    20
    One sentence content tow answers.
    Thanks a lot man

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...