Skip to content

Instantly share code, notes, and snippets.

@brucewoodward
Created April 15, 2019 06:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brucewoodward/c509d48936e55077baedc6e5d66d80d6 to your computer and use it in GitHub Desktop.
Save brucewoodward/c509d48936e55077baedc6e5d66d80d6 to your computer and use it in GitHub Desktop.
Rotate a message on the screen.
#!/bin/bash
# When I was 11, this bit of code appeared in a book on BASIC that had.
# This is just for nostalgia.
str="$1"
typeset -i start=0 len=${#str}
while true
do for s in `seq 1 $len`
do clear
echo -e "\n\n\n\n\n\n\n\n\n\n\t\t\t\t"${str:$s:$len}${str:0:$s}
sleep 0.15
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment