Advertisement
mhdew

Shell Reverse List

Dec 9th, 2019
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.11 KB | None | 0 0
  1. lst=("10" "23" "34" "43" "45")
  2.  
  3. len=${#lst[@]}
  4.  
  5. for((i=$len-1;i>=0;i--))
  6. do
  7.         echo "${lst[$i]}"
  8. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement