by vbernat · 6y ago · 0 comments
x=(1 2)
echo "${x[0]}"
And associative arrays declare -A x
x[hi]=20
x[bye]=30
echo "${x[hi]}"
for i in "${!x[@]}"; do
echo "k: $i, v: ${x[$i]}"
doneZsh is also really heavy, or it was last time I checked. Larger binary & slower startup time than bash, and lots of features I don’t use. Modules, calendar, tcp, ftp client ... that’s a lot of stuff in the shell that is arguably better put into separate executables.