Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Real time of a clock for every 60 seconds in unix Post 302397738 by ungalnanban on Tuesday 23rd of February 2010 03:23:05 AM
Old 02-23-2010
MySQL

Are your looking for this.
The following command will show the graphical clock

Code:
xclock

The following script will show the digital clock

Code:
tput clear              #clear the screen
tput cup 14             #change the cursor position for columns wise.
while [ true ]          #loop wil execute all times because the condition is always true.
do
echo -e "\r\t\t\t\t\t`date +"%T %P"`\c"   
#\r used to cursor wait the same line. and
#\c is used to suppress the trailing new line.
done


Last edited by ungalnanban; 03-09-2010 at 02:08 AM..
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Real Time feed for NASDAQ, Chi. Merc., Dow in Unix

I need to know where I can get real time stock market data "ticker" feed, in Unix, that can be captured for use in my data base. If there is a subscriber service, that's good but, I really am looking for a software program that can interface with the Market in question, via modem and capture... (2 Replies)
Discussion started by: dkcordova
2 Replies

2. UNIX for Dummies Questions & Answers

time clock program

How would you write a program that would continually show the time in HOURS:MINUTES on an ASCII terminal(not just xclock)? (5 Replies)
Discussion started by: Ben070371
5 Replies

3. UNIX for Dummies Questions & Answers

Flipping between Windows 2k and Unix in real time

What's the best way to run two OS's in real time?? I want to run Windows 2k professional and a flavor of UNIX in real time and flip between the two. I have vmware ver. 3.2 and Virtual PC 4.3. I would preferably like to run Win2k with Solaris 8 (intel version) but I'll download Freebsd if... (1 Reply)
Discussion started by: fusion99
1 Replies

4. Shell Programming and Scripting

Shell script to convert epoch time to real time

Dear experts, I have an epoch time input file such as : - 1302451209564 1302483698948 1302485231072 1302490805383 1302519244700 1302492787481 1302505299145 1302506557022 1302532112140 1302501033105 1302511536485 1302512669550 I need the epoch time above to be converted into real... (4 Replies)
Discussion started by: aismann
4 Replies

5. Programming

PHP Travel Clock based on Mysql Date time

I have date time records in a PHP mysql table, I need a PHP travel clock which obviously counts down, I mean acts like a travel clock, but the clock time should be the date time field value down by the second, based on the full date time, from day to seconds It is not just one record, I... (1 Reply)
Discussion started by: AimyThomas
1 Replies

6. Shell Programming and Scripting

Converting real time to epoch time

# date +%s -d "Mon Feb 11 02:26:04" 1360567564 # perl -e 'print scalar localtime(1360567564), "\n";' Mon Feb 11 02:26:04 2013 the epoch conversion is working fine. but one of my application needs 13 digit epoch time as input 1359453135154 rather than 10 digit epoch time 1360567564... (3 Replies)
Discussion started by: vivek d r
3 Replies

7. Shell Programming and Scripting

Adding Seconds to UNIX/Epoch-Time

Hello All, I have a Perl script I'm writing where I ask the user to enter a "start time" for something. The "$start_time" will be in the format of: # The Time CLI Option Can be in the format of: --start-time="1day" --start-time="2hours" --start-time="45min" ... (1 Reply)
Discussion started by: mrm5102
1 Replies

8. UNIX for Dummies Questions & Answers

Want to practice UNIX in real time servers

I have read enough books and know about all the basic commands in unix. I have practiced the same in my home. Now i want to real time work like scheduling cron in a real time server, creating alerts, application status check using unix etc.., I want to have a real time server acc to do this kind... (3 Replies)
Discussion started by: gk1227
3 Replies
timedc(8)						      System Manager's Manual							 timedc(8)

Name
       timedc - timed control program

Syntax
       /usr/etc/timedc [ command [ argument ...]]

Description
       The program controls the operation of the daemon.  If you run without any arguments, enters interactive mode and displays the prompt.

       If  you	supply	a command on the command line, runs the command and then exits.  If you redirect the standard input of from an interactive
       terminal to a file, interprets the contents of the file as a list of commands separated by carriage returns  and  terminated  with  an  EOF
       character.

Commands
       ?[command...]

       help[command...]    Prints  a  short  description of each command specified in the argument list.  If no arguments are given, a list of the
			   recognized commands is printed.

       clockdiff[host...]  Computes the differences between the clock of the host machine and the clocks of the machines given as arguments.

       trace[ on | off ]   Enables or disables the logging of incoming messages to The command logs messages in the file

       [ incr | decr ] [ -cd ][minutes:][seconds.][microseconds]
			   Increments or decrements the value of the local clock so that the clock gains or loses the specified amount of time.

			   -c	     Adjusts the local clock continuously.  Adjustments specified with the  switch  should  be	on  the  order	of
				     microseconds,  and  are  added  or  subtracted from the local clock in small stages.  This type of adjustment
				     avoids large instantaneous jumps and guarantees that the graph of local clock time versus real  time  remains
				     continuous.

				     The following example increments the local clock continuously by 500 microseconds: /etc/timedc incr -c 500

			   -d	     Adjusts  the  local  clock  instantaneously.  Adjustments specified with the switch should be on the order of
				     seconds, and are added or subtracted from the local clock at once.  The graph of local clock time versus real
				     time is discontinuous.

				     The following example decrements the local clock discontinuously by five minutes and two seconds: /etc/timedc
				     decr -d 5:2

       msite		   Indicates which site the master is running on currently.

       quit		   Exits from the program.

Diagnostics
       ?Ambiguous command
       Abbreviation matches more than one command.

       ?Invalid command
       No match was found.

       ?Privileged command
       Command can be executed by root only.

Files
       Tracing file for

       Log file for master

See Also
       date(1), adjtime(2), settimeofday(2), timed(8)

																	 timedc(8)
All times are GMT -4. The time now is 04:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy