KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I get the following output: Pushkin - 100500 Gogol - 23 Dostoyevsky - 9999 Which is the result of the following script: for k in "${!authors[@]}" do echo $k ' - ' ${authors["$k"]} done All I want is to get the output like this: Pushkin - 100500 Dostoyevsky - 9999 Gogol - 23 which means that the keys in associative array should be sorted by value. Is there an easy method to do so?
Tags (comma-separated)
Save Edits
Cancel