i have a shell script variable etc "string" i want to give this string as value of another variable,abc sorted like string=CDA want to add ADC to a "ordered" variable
$string=CDA $ordered=ADC
You can do:
> string=CDA > s=$(grep -o . <<<"$string"|sort|tr -d "\n") > echo "$s" ACD
You can do: