From f634dc3590c777ba737c6e856823cd08c8a856f8 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sat, 27 Apr 2013 16:48:12 +0900 Subject: [PATCH] enter to exit in clk --- bashrc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bashrc b/bashrc index 0cd0565..e49d697 100755 --- a/bashrc +++ b/bashrc @@ -282,10 +282,13 @@ ssh(){ clk(){ local tformat="%Y/%m/%d %H:%M:%S %z" cal - while true + REPLY= + printf "\\r`date "+${tformat}"`" + read -t 1 + while test $? -ne 0 do printf "\\r`date "+${tformat}"`" - sleep 1 + read -t 1 done }