shell实现毫秒级时钟

每100ms输出一次时间

#!/bin/bash
clear
tput civis
while [ 1 ]
do
   tput clear
   echo $(date "+%Y-%m-%d %H:%M:%S.%N"|cut -b 1-21)"00"
   usleep 100000
done

你可能感兴趣的:(Linux,shell,date)