#!/usr/bin/env bash

array=("a c" b f "Change" "3 5")
IFS=$'\n' sorted=($(sort <<<"${array[*]}"))

echo ""

echo "Print out array elemnts (for loop)"
echo "=================================="
for val in ${sorted[@]} ; do
   echo -e "\t$val"
done

echo ""

echo "Print out array elemnts (printf)"
echo "================================"
printf "\t%s\n" "${sorted[@]}"

echo ""
exit
