#!/usr/bin/env bash array=("test0" "test1" "test2") suffix="henlo" echo "${array[@]}" echo "" array=("${array[@]/%/${suffix}}") echo "${array[@]}"