tobor 1238073412 learn Never use eval! But here is a one liner push function:bpush(){ x='${#'${1}'[@]}' ; eval index=$x ; x=${1}'['$index']=$2'; eval $x; } tobor 1247671358 forget ormaaj 1356062985 learn https://github.com/vaeth/push/ See also: http://mywiki.wooledge.org/BashFAQ/050