Advertisement
Guest User

Untitled

a guest
May 2nd, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.22 KB | None | 0 0
  1. XX----------------------------------------------------------XX
  2. |XXX |XXX
  3. | XX | XXX
  4. | XX------------------------------------------------------+-----XXX
  5. | | +
  6. | | +----------------------------------------------------+ |
  7. | | | | |
  8. | | | | |
  9. | | | | |
  10. | | | | |
  11. | | | | |
  12. | | | 12:34:56 <------+ Characters to replace! |
  13. | | | | |
  14. | | | <--------------------------+ | |
  15. | | | | |
  16. | | | | |
  17. | | | | |
  18. +XX--+ | | |
  19. XX | +----------------------------------------------------+ |
  20. XXX |
  21. +--------------------------------------------------------------+
  22.  
  23. #!/bin/bash
  24.  
  25. function printThing(){
  26. local timeVar=$(date +"%T")
  27. local lines=(' XX----------------------------------------------------------XX' ' |XXX |XXX' ' | XX | XXX' ' | XX------------------------------------------------------+-----XXX' ' | | +' ' | | +----------------------------------------------------+ |' ' | | | | |' ' | | | | |' ' | | | | |' ' | | | | |' ' | | | | |' " | | | $timeVar <------+ Characters to replace! |" ' | | | | |' ' | | | <--------------------------+ | |' ' | | | | |' ' | | | | |' ' | | | | |' ' +XX--+ | | |' ' XX | +----------------------------------------------------+ |' ' XXX |' ' +--------------------------------------------------------------+' )
  28.  
  29. for i in "${lines[@]}"
  30. do
  31. echo "$i"
  32. done
  33.  
  34. while :
  35. do
  36. local timeVar=$(date +"%T")
  37. #Replace the time in the strings printed above
  38. sleep 1
  39. done
  40. }
  41.  
  42. printThing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement