INNER CODE UNIT · Shell

array_prepend

gruntwork-io/bash-commons · modules/bash-commons/src/array.sh:77

function array_prepend {
  local -r prefix="$1"
  shift 1
  local -ar ary=($@)

  updated_ary=( "${ary[@]/#/$prefix}" )
  echo ${updated_ary[*]}
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…