The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
echo in ksh sh & bash Alalush UNIX for Advanced & Expert Users 4 02-02-2009 06:38 AM
Constant mirroring sstevens Shell Programming and Scripting 1 09-25-2008 01:50 PM
what is ksh equivalent of bash echo -n ? mudhireddy Shell Programming and Scripting 3 12-15-2006 04:24 PM
bash pattern matching echo *[! '/' ] doesn't work james hanley UNIX for Dummies Questions & Answers 1 07-16-2006 06:10 PM
AIX Constant Rebooting AIXNEWBEE AIX 4 10-30-2005 05:33 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-07-2009
mikejreading mikejreading is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 22
Question Constant update echo in BASH

Hi all,

Basically Im trying to put the current time in a script in BASH. Tried the watch command, but its not really what I want.

I will have lots of things in this script, current date and time being just a few).

Any ideas?
  #2 (permalink)  
Old 05-07-2009
redhead's Avatar
redhead redhead is offline
Registered User
  
 

Join Date: Feb 2002
Location: Denmark
Posts: 68
man date
  #3 (permalink)  
Old 05-07-2009
mikejreading mikejreading is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 22
Yes... that's not what i want. By current time, i meant constant current time. Not the time when the script is run. I want the time to constantly update while the script is running.
  #4 (permalink)  
Old 05-07-2009
System Shock's Avatar
System Shock System Shock is offline Forum Advisor  
Registered User
  
 

Join Date: May 2006
Location: Tau Ceti V
Posts: 521
What "time" is it that you want to update? Do you want to update this time in a file? On the screen?

Is it that you want to display a timer on the screen while your script runs, kind of like a progress bar, but instead of showing dashes or a percentage, you want to show a timer?
  #5 (permalink)  
Old 05-07-2009
mikejreading mikejreading is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 22
The time like a clock. Basically, i am making a menu driven programme and i would like to have a "clock" on the top of each menu page.

The only way I have been able to make it work at the minute is by using the watch command as follows:

DATE FILE

Code:
echo "The time/date is: `date`"

COMMAND TO BE USED

Code:
watch ./date

However I planned to awk out the date to leave just the time, but the watch command takes up the full screen and doesnt allow menu inputs.. any other ideas?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:33 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0