From 2c8a79e4dadc6ab0541412db0f3acad49c6670cc Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sat, 29 Dec 2012 03:29:37 +0900 Subject: [PATCH] fix clock() --- bashrc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bashrc b/bashrc index f8b0c53..2428e9a 100755 --- a/bashrc +++ b/bashrc @@ -250,12 +250,10 @@ alias setup.py="sudo python3 setup.py install --record files.txt" clock(){ local tformat="%Y/%m/%d %H:%M:%S %z" - local t= cal while true do - t="`date "+${tformat}"`" - printf "\\r$t" + printf "\\r`date "+${tformat}"`" sleep 1 done }