title: How to sort string array in descending order in Bash?
body: <p>let's say I have an array:</p>
  
  <p><code>nameArr=("Leia", "Darth Vader", "Anakin", "Han Solo", "Yoda")</code></p>
  
  <p>and I would like to sort in descending order. How could I do it in Bash shell scripting? In ascending order I am using command:</p>
  
  <p><code>arrAsc=($(for l in ${nameArr[@]}; do echo $l; done | sort))</code></p>
  
  <p>Thanks a lot for help!</p>