11-05-2000
42,
1
Join Date: Oct 2000
Last Activity: 10 April 2001, 4:35 PM EDT
Posts: 42
Thanks Given: 0
Thanked 1 Time in 1 Post
Hi,
Anyone ever write a unix clock program that display the clock out in 7 segment LCD style.
I tried doing one with case statements:
!/usr/bin/ksh
clock=`date`
case $clock in
#This prints out the number 0
0)
echo " -"
echo "| |"
echo
echo "| |"
echo " -"
;;
#This prints out the number 1
1)
echo
echo "|"
echo
echo "|"
echo
Etc, to the rest of the number 2-9.
But I want the clock to print out line by not number by number.(5 lines) All with "-" and "|".
Including military format, hours, minutes, seconds.
So I thought of doing some sort of for loop which would have to execute 6 times(2 for every set - hours,minutes,seconds)
I am really confused.
Thanks,
A