Created
August 29, 2012 17:03
-
-
Save sullust/3515669 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
area[11]=23 | |
area[13]=37 | |
area[51]=UFOs | |
# Array members need not be consecutive or contiguous. | |
# Some members of the array can be left uninitialized. | |
# Gaps in the array are okay. | |
# In fact, arrays with sparse data ("sparse arrays") | |
#+ are useful in spreadsheet-processing software. | |
echo -n "area[11] = " | |
echo ${area[11]} # {curly brackets} needed. | |
echo -n "area[13] = " | |
echo ${area[13]} | |
echo "Contents of area[51] are ${area[51]}." | |
# Contents of uninitialized array variable print blank (null variable). | |
echo -n "area[43] = " | |
echo ${area[43]} | |
echo "(area[43] unassigned)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment