This is probably a simple code , but i was looking in sort command and none of the switches work for this case .
for example :
Code:
#!/bin/bash
echo -n "Write a number not in order : "
read -r mynmb
varout=$(echo $mynmb | sort -n)
echo""
echo "You wrote : $mynmb and was arranget in order by this : $varout"
basically i want to arrange :
example :
from : 283741 to 123478
This is probably simple , but i cant get into it directly from a variable .