#!/bin/sh sigwinch() { clear WIDTH=$(stty size | cut '-d ' -f2) } trap sigwinch WINCH sigwinch if [ "_$DELAY" = "_" ];then DELAY=1 fi while true;do printf "\x1b[7m" #reverse colors echo "running $* @ $(date)" | pad $WIDTH printf "\e[0m" #reset colors $* | pad sleep $DELAY printf "\x1b[H" done