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?
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?
man date
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.
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?
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
echo "The time/date is: `date`"
COMMAND TO BE USED
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?