Advertisement
metalx1000

Sorting Numbers in Pure BASH

Jan 8th, 2025
341
0
Never
1
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
Comments
  • pastebinuser124
    86 days
    # text 0.34 KB | 0 0
    1. hi, do you remember https://www.youtube.com/watch?v=9cgdkpxTCs8&lc=UgxEwh5YeGzrxQRmVP94AaABAg.AD_uso9aJkGADanTKP2v75
    2. i tried multiple times to post my code in yt comments, but it was always deleted. and why did you not answer to my questions if you have seen my code before deletion? anyway, here is my code on pastebin: https://pastebin.com/DiSTVmXs
Add Comment
Please, Sign In to add comment
Advertisement