I need to sort the following array by two keys, score and alphabetically.
For example:
arr = (Hawrd 60 James 75 Jacob 60 Leonard 75)
will become :
sorted = (Hawrd 60 Jacob 60 James 75 Leonard 75)
*actually I don't need the sorted array, just need to print it (in a format of name and a score). Thanks! *I read about the command sort but I dont see how can I sort by two keys using that command
EDIT: Sorry if it wasn't clear enought, but I meant that each person has its own score, Leonard has 75, Jacob has 60 and in the end of the process, each person will still have the same score.