bash: array - Print the entire array.



  • Take into account the main readme for this section. README first.

    An array called planet.

    $ declare -a planet=(earth wind fire)
    

    Print the entire array. Note there is a difference when using * and @

    $ echo "${planet[*]}"
    earth wind fire
    $ echo "${planet[@]}"
    earth wind fire
    

Log in to reply
 

© Lightnetics 2024