17 lines
265 B
Text
17 lines
265 B
Text
|
#!/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"
|