一个山寨版屏幕时钟

1096阅读 1评论2009-03-10 MMMIX
分类:

一个山寨版屏幕时钟


一时兴起,看了下 tget 的用法,搞了个山寨版屏幕时钟

#!/bin/sh

# get clock position

if [ -z "$1" ]; then x=50 ; else x=$1 ; fi
if [ -z "$2" ]; then y=0 ; else y=$2 ; fi

clr

while(true)
do
    tget -goto $x $y
    date
    sleep 1
done


当然,这个还可用做种种改进,例如让这个时钟在屏幕上乱飘 :-D
上一篇:对 VirtualBox 和 OpenSolaris 失望了
下一篇:Operating System: Design and Implementation(3rd)

文章评论