Created
May 9, 2017 00:54
-
-
Save linhxhust/67c329ddec924b42bfbdf0aed8f6e024 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SAMPLE_ARR=("one" "two" "three" "four") | |
printf ${SAMPLE_ARR[*]} # one two three four | |
printf ${SAMPLE_ARR[@]} # one two three four | |
printf ${SAMPLE_ARR[1]} # two | |
SAMPLE_ARR[4]="five" | |
printf ${SAMPLE_ARR[*]} # one two three four five | |
unset SAMPLE_ARR[2] | |
printf ${SAMPLE_ARR[*]} # one two four five | |
unset SAMPLE_ARR | |
printf ${SAMPLE_ARR[*]} # nothing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment