302a290c51459a60f935efa91be75253?s=100
Nick
Description

Simple spinner implemented in shell

spiner(){
    trap 'tput cnorm' EXIT INT
    local s=$(($SECONDS +$1))
    tput civis
    while [[ $SECONDS -lt $s ]]; do
        for f in '|' '\' '-' '/';do echo -n "$f"
            sleep .2s
            echo -n $'\b'
        done
    done
    tput cnorm
}
Statistics
46 views by Anonymous and 3 views by registered users
Tags
shell spiner
Extra Info
Uname
Linux beast 3.2.0-27-generic #43-Ubuntu SMP Fri Jul 6 14:25:57 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Desktop
GNOME
Term
xterm-256color
Shell
/bin/bash
Size
80x22

Simple spiner function - 80x22

Fork me on GitHub