How to define array in multiple lines in Shell, If you want to print the whole array, you need: echo ${messages[@]}.
It’s fairly common in scripts to extract the first element out of an array then “shift” the remaining elements. Perl has a special shift operator for doing this as do many of the UNIX shells. PowerShell, however, doesn’t have a shift operator built-in. So how do we shift arrays ...