fork download
  1. #!/usr/bin/env bash
  2.  
  3. mapfile -t X < <(seq 10)
  4. mapfile -t Y < <(seq 20)
  5.  
  6. count_x=${#X[@]}
  7. count_y=${#Y[@]}
  8.  
  9.  
  10. # Find out which of the two is larger in size, assuming that's a possibility
  11. if [[ $count_x -lt $count_y ]]; then count=$count_y; else count=${count_x}; fi
  12.  
  13. printf "=%.0s" $(seq 1 50)
  14. printf "\n"
  15. printf "%-30s : %10s\n" "PreferredList IP's" "DefaultServerList IP's" # print header
  16. printf "=%.0s" $(seq 1 50) # print separator
  17. printf "\n" # print newline
  18.  
  19. for i in $(seq $count);
  20. do
  21. printf "%-30s : %10s\n" "${X[i-1]}" "${Y[i-1]}"
  22. done
Success #stdin #stdout 0s 5092KB
stdin
Standard input is empty
stdout
==================================================
PreferredList IP's             : DefaultServerList IP's
==================================================
1                              :          1
2                              :          2
3                              :          3
4                              :          4
5                              :          5
6                              :          6
7                              :          7
8                              :          8
9                              :          9
10                             :         10
                               :         11
                               :         12
                               :         13
                               :         14
                               :         15
                               :         16
                               :         17
                               :         18
                               :         19
                               :         20