grimoire/bash/tickertape

16 lines
260 B
Bash
Executable file

#!/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"