Advertisement
metalx1000

Draw Grid in Terminal with Escape Codes

Jan 5th, 2025
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.34 KB | None | 0 0
  1. #!/bin/bash
  2. clear
  3.  
  4. # hide cursor
  5. printf "\033[?25l"
  6. for x in `seq 45 2 75`;
  7. do
  8.   for y in `seq 1 25`
  9.   do
  10.       printf "\033[${y};${x}H█"
  11.       sleep .001
  12.   done
  13. done
  14.  
  15. for x in `seq 45 75`;
  16. do
  17.   for y in `seq 1 2 25`
  18.   do
  19.       printf "\033[${y};${x}H█"
  20.       sleep .001
  21.   done
  22. done
  23.  
  24. # show cursor
  25. printf "\033[?25h"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement