Merge branch 'release-2.140.93'
[feisty_meow.git] / examples / bashisms / it_is_possible_to_cleanly_copy_array_elems.txt
1
2
3 # when the array elements have spaces, it is still possible to get them back right.
4
5
6 a=("ted row" "boon" "moopy dongle")
7 echo ${#a[@]}
8 # 3
9 borg=( "${a[@]}" )
10 echo ${#borg[@]}
11 # 3
12
13 # normally the setting of borg would not preserve the elements with spaces in them as separate.
14 # but by using the @ to get all the array members and the spaces around the reference, you get
15 # the list back properly.
16