SyntaxFix
Write A Post
Hire A Developer
Questions
array=(a c b f 3 5) new_array=($(echo "${array[@]}" | sed 's/ /\n/g' | sort)) echo ${new_array[@]}
echo contents of new_array will be:
3 5 a b c f