Guest User

Untitled

a guest
Nov 18th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #!/bin/bash
  2. # Written by Locutus for bash demonstration.
  3.  
  4. rotateCursor()
  5. {
  6. case $toggle
  7. in
  8. 1)
  9. echo -n $1" \ "
  10. echo -ne "\r"
  11. toggle="2"
  12. ;;
  13.  
  14. 2)
  15. echo -n $1" | "
  16. echo -ne "\r"
  17. toggle="3"
  18. ;;
  19.  
  20. 3)
  21. echo -n $1" / "
  22. echo -ne "\r"
  23. toggle="4"
  24. ;;
  25.  
  26. *)
  27. echo -n $1" - "
  28. echo -ne "\r"
  29. toggle="1"
  30. ;;
  31. esac
  32. }
  33.  
  34. while [ 0 ]
  35. do
  36. rotateCursor " Spinning around happily"
  37. sleep 1
  38. done
Add Comment
Please, Sign In to add comment