Вы можете сделать это, просто расширив параметры оболочки :Это действительно один -лайнер
poem='foo bar, foo bar, foo bar
foo bar'
traits=( "is super" "is blazing fast" "is marvelous" "cawabanga" )
for trait in "${traits[@]}"; do poem=${poem/bar/"superman $trait"}; done
echo "$poem"
foo superman is super, foo superman is blazing fast, foo superman is marvelous
foo superman cawabanga