Display a tickertape across the screen
This commit is contained in:
parent
615a322641
commit
64dbd49a40
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cols=$(tput cols) line=""
|
||||||
|
|
||||||
|
while (( ${#line} < cols + ${#1} )); do
|
||||||
|
if (( ${#line} < ${#1} )); then
|
||||||
|
line=${1:$(( ${#1} - ${#line} - 1)):1}$line
|
||||||
|
else
|
||||||
|
line=" $line"
|
||||||
|
fi
|
||||||
|
|
||||||
|
sleep 0.2
|
||||||
|
printf "\r%s" "${line:0:$cols}"
|
||||||
|
done
|
||||||
|
|
||||||
|
printf "\n"
|
Loading…
Reference in New Issue