Advertisement
metalx1000

Sorting Numbers in Pure BASH

Jan 8th, 2025
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.14 KB | None | 0 0
  1. #!/bin/bash
  2. #sort Numbers in Pure BASH
  3. arr=()
  4. for num in 8 22 9 100 4 35; do
  5.     arr[num]=
  6. done
  7. echo "${!arr[@]}"
  8. # Output: 4 8 9 22 35 100
  9.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement