Shell script reverse sort

Reverse sorting concept

Reorder the contents of the original array in reverse order

The basic idea of ​​reverse sorting

Replace the last element of the array with the first element, replace the penultimate element with the second element, and so on, until all the array elements are reversed and replaced

experiment

Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/MQ107/article/details/114702794