Advertisement
Legomancer

Grid Generator Challenge Stretch Goal

Sep 17th, 2021
1,466
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.56 KB | None | 0 0
  1. echo "    \c"       # \c prevents echo taking a new line at the end of a line
  2. for i in {A..J};    # loop through letters A to J, assign to var i
  3. do
  4.  echo "$i \c"       # echo i then space
  5. done
  6. echo                # echo a blank line
  7.  
  8. echo "    \c"
  9. for i in {1..10}    # I cudv done A..J
  10. do
  11.  echo "_ \c"        # top of the grid
  12. done
  13. echo
  14.  
  15. for i in {0..1}{0..9}  # joined curly bracket expansion is the equivalent of 00-19
  16. do
  17.  echo "$i |\c"         # first pipe character
  18.  for i in {A..J}
  19.  do
  20.   echo '_|\c'          # the rest of the boxes
  21.  done
  22.  echo
  23. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement