A terminal animation that prints a continuously growing and shrinking bar of # characters with a line counter, useful as a visual heartbeat.
./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
widthis not divisible bystep, the bar won't reach full width.
./moving_bars.sh # defaults
./moving_bars.sh 60 # narrower bar
./moving_bars.sh 60 5 0.1 # coarser steps, slower update