From b9000fd80aa1854cfbfb9bb1281a579a5b4d8982 Mon Sep 17 00:00:00 2001 From: thibault ketterer Date: Fri, 3 May 2019 13:34:32 +0200 Subject: [PATCH] nicer output: remove flickering --- countdown.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/countdown.sh b/countdown.sh index 96ab8f8..eed7762 100644 --- a/countdown.sh +++ b/countdown.sh @@ -36,9 +36,9 @@ percent=0 total_time=0 col=`tput cols` col=$[ $col -5 ] - +clear while [ $sec_rem -gt 0 ]; do - clear + tput cup 0 0 date let sec_rem=$sec_rem-1 interval=$sec_rem