MC9227 - System Software Lab
Practical Program 6
Shell Programming - Generation of Digital Clock
[rmurali@AntiViruS
~/SS]$ cat > shell.sh
clear
echo;
echo
"Practical Program 6 : Shell Programming"
echo
"Digital Clock"
echo
"Appears in the top Row Right Corner"
echo
"Press Ctrl+C to quit the program"
while
:
do
ti=`date
+"%r"`
echo
-e -n "\033[7s"
tput
cup 0 59
echo
-n $ti
echo
-e -n "\033[8u"
sleep
1
done
echo
$ti
[rmurali@AntiViruS
~/SS]$ sh shell.sh
12:38:53 PM
Practical
Program 6 : Shell Programming
Digital
Clock
Appears
in the top Row Right Corner
Press
Ctrl+C to quit the program
[rmurali@AntiViruS ~/SS]$
No comments:
Post a Comment