I am trying to do this:
declare -a ip_array=( [127.0.0.1]=127.1.1.1 [127.1.1.1]=127.0.0.1 )
However bash complains as it thinks the decimals are operators:
bash: 127.0.0.1: syntax error: invalid arithmetic operator (error token is "127.0.0.1")
I tried using single and double quotes but it seems to evaluate arithmetically every time.
EDIT: I did not notice that there is a difference between lowercase -a and uppercase -A options when declaring an array.