source:
trunk/essentials/app-shells/bash/examples/scripts/spin.bash@
3506
| Last change on this file since 3506 was 3228, checked in by , 19 years ago | |
|---|---|
| File size: 285 bytes | |
| Line | |
|---|---|
| 1 | #!/bin/bash |
| 2 | # |
| 3 | # spin.bash -- provide a `spinning wheel' to show progress |
| 4 | # |
| 5 | # Chet Ramey |
| 6 | # [email protected] |
| 7 | # |
| 8 | bs=$'\b' |
| 9 | |
| 10 | chars="|${bs} \\${bs} -${bs} /${bs}" |
| 11 | |
| 12 | # Infinite loop for demo. purposes |
| 13 | while : |
| 14 | do |
| 15 | for letter in $chars |
| 16 | do |
| 17 | echo -n ${letter} |
| 18 | done |
| 19 | done |
| 20 | |
| 21 | exit 0 |
Note:
See TracBrowser
for help on using the repository browser.
