summaryrefslogtreecommitdiff
path: root/examples/scripts/spin.bash
diff options
context:
space:
mode:
Diffstat (limited to 'examples/scripts/spin.bash')
-rw-r--r--examples/scripts/spin.bash21
1 files changed, 21 insertions, 0 deletions
diff --git a/examples/scripts/spin.bash b/examples/scripts/spin.bash
new file mode 100644
index 0000000..dc6a66a
--- /dev/null
+++ b/examples/scripts/spin.bash
@@ -0,0 +1,21 @@
+#!/bin/bash
+#
+# spin.bash -- provide a `spinning wheel' to show progress
+#
+# Chet Ramey
+# chet@po.cwru.edu
+#
+bs=$'\b'
+
+chars="|${bs} \\${bs} -${bs} /${bs}"
+
+# Infinite loop for demo. purposes
+while :
+do
+ for letter in $chars
+ do
+ echo -n ${letter}
+ done
+done
+
+exit 0