Programming Tutorials

(追記) (追記ここまで)

Digital Clock in Shell Script

By: Vivek G in Linux Tutorials on 2011年01月29日 [フレーム]

This shell script shows how to display a digital clock in linux.
 echo 
echo "Digital Clock for Linux"
echo "To stop this clock use command kill pid, see above for pid"
echo "Press a key to continue. . ."
while :
do
 ti=`date +"%r"` 
 echo -e -n "033円[7s" #save current screen postion & attributes
 #
 # Show the clock
 #
 
 tput cup 0 69 # row 0 and column 69 is used to show clock
 
 echo -n $ti # put clock on screen
 
 echo -e -n "033円[8u" #restore current screen postion & attributs
 #
 #Delay fro 1 second
 #
 sleep 1
done



(追記) (追記ここまで)


Add Comment

JavaScript must be enabled for certain features to work
* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in Linux )

Latest Articles (in Linux)

(追記) (追記ここまで)
(追記) (追記ここまで)

Related Tutorials

AltStyle によって変換されたページ (->オリジナル) /