greycat 1166723290 learn a=(0 1 2 3 'one hundred twenty'); for x in "${a[@]}"; do echo "$x"; done; unset a[2]; ... igli 1177433631 forget igli 1177433684 learn a=(0 1 2 3 'one hundred twenty'); for x in "${a[@]}"; do echo "$x"; done; unset a[2]; echo ${a[@]/search/replace}; see | http://wooledge.org/mywiki/BashFaq#faq43 igli 1177433725 forget igli 1177433736 learn a=(0 1 2 3 'one hundred twenty'); for x in "${a[@]}"; do echo "$x"; done; unset a[2]; echo "${a[@]/search/replace}"; see | http://wooledge.org/mywiki/BashFaq#faq43 greycat 1177618746 forget greycat 1177618776 learn Arrays RULE! See http://wooledge.org/mywiki/BashFaq#faq5 igli 1192327216 forget igli 1192327293 learn Arrays RULE! See http://wooledge.org/mywiki/BashFAQ#faq5 -- Remember !@ applies to normal arrays as well as argv. igli 1192327319 forget igli 1192327327 learn Arrays RULE! See http://wooledge.org/mywiki/BashFAQ#faq5 -- Remember !$@ applies to normal arrays as well as argv. greycat 1204318631 forget greycat 1204318656 learn Arrays RULE! See http://wooledge.org/mywiki/BashFAQ/005 -- and remember, "${arr[@]}" works like "$@". ferret 1206210438 forget ferret 1206376496 learn With arrays you can enumerate elements without an explicit delimiter (like space or newline). They cannot provide any 'associative' or 'hash' behavior. If you really think you need this, use awk. http://wooledge.org/mywiki/BashFAQ/005 -- and remember, "${arr[@]}" works like "$@" lhunath 1208186457 forget lhunath 1208186527 learn An array is an indexed sequence of strings. See http://wooledge.org/mywiki/BashFAQ/005 lhunath 1208186613 forget lhunath 1208186683 learn An array is an indexed list of strings. It maps *integers* to *strings*. See http://wooledge.org/mywiki/BashFAQ/005 meatmanek 1232248628 forget meatmanek 1232248630 learn An array is an indexed list of variables. It maps integers to members. See http://wooledge.org/mywiki/BashFAQ/005 meatmanek 1232248667 forget meatmanek 1232248674 learn An array is an indexed list of variables. It maps integers to members (usually strings). See http://wooledge.org/mywiki/BashFAQ/005 lhunath 1234188107 forget lhunath 1234188115 learn # echo !arrays greycat 1234188414 forget greycat 1234188444 learn An array is a one-dimensional vector; an numerically indexed mapping, from integers to strings. See http://wooledge.org/mywiki/BashFAQ/005 yitz_ 1248193525 forget yitz_ 1248193526 learn #redirect arrays e36freak 1325880022 forget e36freak 1325880026 learn An array maps numbers to strings. Bash 4 also has associative arrays (maps strings to strings). See http://mywiki.wooledge.org/BashSheet#Arrays and http://mywiki.wooledge.org/BashFAQ/005 ormaaj 1333507154 forget ormaaj 1333507216 learn An array maps numbers to strings. Bash 4 also has associative arrays (maps strings to strings). http://mywiki.wooledge.org/BashSheet#Arrays http://mywiki.wooledge.org/BashFAQ/005 http://wiki.bash-hackers.org/syntax/arrays emanuele6 1713015791 forget emanuele6 1713015902 learn An array maps numbers to strings. Bash 4 also has associative arrays (maps non-empty strings to strings). http://mywiki.wooledge.org/BashSheet#Arrays http://mywiki.wooledge.org/BashFAQ/005 https://web.archive.org/web/20230403055152/https://wiki.bash-hackers.org/syntax/arrays