I would like to sort lines of text according to character code or ASCII code value by command line. I tried the following command line but the result is not what I expected.

# string="   8888888
>'
> Transportation
> Temp
>temp
>TEMP
>    99
>    Temp
>  Temporary"
# LC_ALL=C echo "$string" | sort 
'
   8888888
    99
temp
 Temp
    Temp
TEMP
  Temporary
 Transportation

To sort according to ASCII code value, the output should look like

    99
    Temp
   8888888
  Temporary
 Temp
 Transportation
'
TEMP
temp

Does anyone know how to do that?

Edit
Report