How to make a simple spinner in Bash
This seems the simplest way to make a spinner. To stop it, use the break (ctrl+c) 😉
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
#!/usr/bin/env bash # Hide cursor echo -en "\033[?25l" # Spin spin spin... i=1 sp='\|/-' delay=0.15 while : do printf "\b${sp:i++%${#sp}:1}" sleep $delay done |