There is also a solution possible using "rev". Rev reverses all characters per line. Therefore:
Replace space as newlines
Reverse all characters per line
Lose newlines by avoiding quote
Reverse the whole string
list="abc cde efg" reverselist=$(echo $(rev <<< ${list// /$'\n'}) | rev) echo $reverselist