answersLogoWhite

0


Best Answer
Digital CLOCK on your Screen Using Unix

echo

echo "Digital Clock for unix"

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 position & attributes

tput cup 0 69

# row 0 and column69 is used to show clock

echo -n $ti

# put clock on screen

echo -e -n "\033[8u"

#restore current screen position & attributes

sleep 1

done

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you display digital clock using shell script?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write a statement in DOS using shell script to display a word?

We can not perform Shell Scripting in DOS, we can do Batch programing in DOS..


How do you display the values in shell script?

Use the builtin 'echo' or 'print' command followed by the shell variable name, which will substitute the value when printed/displayed.


Write a program in shell script to display odd number from 0 to 100?

seq 1 2 99


Write a shell program called whos to display a sorted list of the logged in usersJust display the user names and no other information?

The 'users' command should do that; you don't need to write a shell script to get that information in that format.


What is the command to execute a shell script?

If the shell script is readable and executable then to execute it just type the name of the shell script file. Otherwise, you can explicity call a shell interpreter to run the file as a shell script, i.e., ksh myfile


Can you execute a shell script if you do not have read permission for the file containing the script?

No, the shell needs both execute and read permissions to run the script.


Write a shell script to show that user is logged in or not?

You don't need a shell script for that; use either 'whoami' or 'id'


Parse log files-shell script?

There are following shell scripts available at the below mentioned url -1. Shell Script for Log4j Log Analysis and exception reporting2. Log Monitoring Shell Script - email upon errorsHope that's what you are looking for.


Which clock radio comes with the most features?

The Productive Electronics SS-DF-DU - SecureShot DUALLY Digital Photo Frame And Clock Radio is one of the most versatile clocks, combining a digital picture frame, atomic clock, radio, mp3 player, and a calendar feature all within its space-saving shell.


Write a shell script to display the smallest file name in respect of the string length among the list of files available in the current directory?

ls-lS | tail-1


What is the Purpose of exit command in Shell of Unix?

The 'exit' command allows you to stop a running shell script at any point and to return a "status" value back to whomever called the shell script. This is a very common practice with shell scripts; sometimes you want to stop the script before it gets to the end of the shell script (for various logic reasons). The 'exit' command also allows you to give a status that any other calling process can use to determine if the shell script ended successfully or not.


Where is the tortoise shell in you spy?

It is in the clock and it is the shell of a turtle