"You've probably seen some long running console program that
shows a spinner while it runs. A spinner being the aforementioned
sequence of characters output one after the other at the same place
on the screen with a pause between each character. The code in this
article creates a spinner which runs in a separate process. By
doing this the spinner spins at a constant rate and doesn't pause
when your script pauses. It also eliminates the need to sprinkle
spinner output messages throughout your program.
"In addition the spinner reads from a log file created by the
main process and displays the last line from the log file next to
the spinner. When the log file goes away the spinner exits.
"This is the script for the main process, called runner.sh:"
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.