Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
cancel
Showing results for 
Search instead for 
Did you mean: 

unix scripting for clock

Dodo_5
Frequent Advisor

unix scripting for clock

can anyone provide me the script for displaying a clock in screen showing also system date.
the scripting should be in unix shell script (mix of perl also)
i dont need any software...only script and commands.
when i will run the script it should show the clock in screen
....waitin for ur reply guys
2 REPLIES
Alexander Chuzhoy
Honored Contributor

Re: unix scripting for clock

Perhaps I don't understand what you mean, but here're my 2 cents.
In perl:
#!/usr/bin/perl
use strict;
my $current_time=localtime time;
print "$current_time\n";



in shell - it's the `date` command.
Ragu_3
Trusted Contributor

Re: unix scripting for clock

Attached is a shell script which is very elegant. You can source this file from .bashrc, the clock wil appear on the right top-corner of your VDU.
Debian GNU/Linux for the Enterprise! Ask HP ...