How to define array in multiple lines in Shell February 27, 2023 by Tarik If you want to print the whole array, you need: echo ${messages[@]}