Advertisement
Guest User

Untitled

a guest
Aug 7th, 2012
1,323
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. # WTF ;)
  3.  
  4. wtf()
  5. {
  6.     tput cup $(($RANDOM % $1)) $(($RANDOM % $2))
  7.     tput setaf $(($RANDOM % 8))
  8.     echo -n $(($RANDOM % 2))
  9. }
  10.  
  11. sig_int_trap()
  12. {
  13.     tput sgr0
  14.     tput cnorm
  15.     exit 0
  16. }
  17.  
  18. init()
  19. {
  20.     trap sig_int_trap SIGINT
  21.     tput civis
  22. }
  23.  
  24. height=$(tput lines)
  25. width=$(tput cols)
  26.  
  27. init && while true; do wtf $height $width; done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement