There are two things, the number of tries and the running clock. The -t option of the read internal command takes care of the timout while the shell wait for the user input.
But you have to implement a general timer that will start as soon as the script starts. For that, use the date function converted in number of seconds since EPOCH. That's the idea. Try this:
And.. please use the CODE tags for clarity.
Last edited by ripat; 09-29-2009 at 01:14 PM..
Reason: some fixing
hi ,
Is there anyway to change ip on sco5.04 i tried using netconfig on the prompt but gives me error . how do u manually change ip cant use acoadmin and netconfig ....
thx
art (2 Replies)
Discussion started by: art_malabanan
2 Replies
2. Post Here to Contact Site Administrators and Moderators
Hello,
Pls change my login name to Awadhesh instead of awadhesh if possible. it will be more better if it become Awadhesh Pandey.
Thanks a lot.
Awadhesh (2 Replies)
Hi,
I would like realize a script that it can change " wc -l" with "wc -l | sed 's/ //g'", but my problem is that i can have
a pipe ,a variable ( many variable different) or a file after wc -l ?how i could test this several case ?
wc -l | cut -d' ' -f1`
if
wc -l ${F} | awk... (1 Reply)
Hi, I am creating a ksh script to search for a string of text inside files within a directory tree. Some of these file are going to be read/execute only. I know to use chmod to change the permissions of the file, but I want to preserve the original permissions after writing to the file. How can I... (3 Replies)
I have 100 files in a directory , all the files have a word "error" and they are created in different date . Now I would like to change the word from "error" to "warning" , and keep the date of the files ( that means do not change the file creation date after change the word ) , can advise what can... (0 Replies)
I have 100 files in a directory , all the files have a word "error" and they are created in different date . Now I would like to change the word from "error" to "warning" , and keep the date of the files ( that means do not change the file creation date after change the word ) , can advise what can... (7 Replies)
Hello
I'm trying to virtualize an instance of Sco Unix 5.0.5 in VirtualBox (called VM-A) , but sco I have problems set to launch with the new raid controller .
The physical machine has a raid controller adaptec (alad driver) but VirtualBox uses buslogic (blc driver)
What ... (3 Replies)
Discussion started by: flako
3 Replies
LEARN ABOUT OPENDARWIN
tcl_gettime
Tcl_GetTime(3) Tcl Library Procedures Tcl_GetTime(3)__________________________________________________________________________________________________________________________________________________NAME
Tcl_GetTime - get date and time
SYNOPSIS
#include <tcl.h>
Tcl_GetTime( timePtr )
ARGUMENTS
Tcl_Time * timePtr (out) Points to memory in which to store the date and time information.
_________________________________________________________________DESCRIPTION
The Tcl_GetTime function retrieves the current time as a Tcl_Time structure in memory the caller provides. This structure has the follow-
ing definition:
typedef struct Tcl_Time {
long sec;
long usec;
} Tcl_Time;
On return, the sec member of the structure is filled in with the number of seconds that have elapsed since the epoch: the epoch is the
point in time of 00:00 UTC, 1 January 1970. This number does not count leap seconds - an interval of one day advances it by 86400 seconds
regardless of whether a leap second has been inserted.
The usec member of the structure is filled in with the number of microseconds that have elapsed since the start of the second designated by
sec. The Tcl library makes every effort to keep this number as precise as possible, subject to the limitations of the computer system. On
multiprocessor variants of Windows, this number may be limited to the 10- or 20-ms granularity of the system clock. (On single-processor
Windows systems, the usec field is derived from a performance counter and is highly precise.)
SEE ALSO
clock
KEYWORDS
date, time
Tcl 8.4 Tcl_GetTime(3)