Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 853 Bytes

File metadata and controls

25 lines (18 loc) · 853 Bytes

moving-bars

A terminal animation that prints a continuously growing and shrinking bar of # characters with a line counter, useful as a visual heartbeat.

Usage

./moving_bars.sh [width] [step] [interval]
Argument Default Description
width 80 Max number of # characters in the bar
step 3 Characters added/removed per line
interval 0.04 Sleep time in seconds between lines

Note: if width is not divisible by step, the bar won't reach full width.

Examples

./moving_bars.sh              # defaults
./moving_bars.sh 60           # narrower bar
./moving_bars.sh 60 5 0.1    # coarser steps, slower update