04-14-2009
the leading zero is indeed the problem.
too bad it's not past 1:00pm here.... otherwise i could help.
but you might try something like:
### Tue Apr 14 11:24:18 EDT 2009
set `date | sed -e 's/:/ /g'`
hours=$4
I think that doesn't have leading zeroes... More after 1:00 if solution isn't posted by then.
10 More Discussions You Might Find Interesting
1. BSD
Say for instance, I would like to reduce the delay/waiting time for the boot-time menu from 10 seconds to 5 seconds, how would I go about doing it?
From what I've been able to find, entering "autoboot 5" into the right file would take care of that for me, but the man pages are unclear as to... (1 Reply)
Discussion started by: DownSouthMoe
1 Replies
2. Solaris
I have a Sol system. The lock timeout is default 15 minutes. I tried to make it longer but cannot by
lock -t timeout
Anyon can tell me the cmd in solai for this please.
A thank in advance (2 Replies)
Discussion started by: part-time-user
2 Replies
3. Shell Programming and Scripting
Hello -
I have a bash script which does some logging, and I'd like to include the line number of the echo statement that pipes into $LOGGER:
MYPID=$$
MYNAME=`basename $0`
LOGGER="/usr/bin/logger -t $MYNAME($LINENO) -p daemon.error"
...
echo 'this is an entry into the log file' | $LOGGER
... (3 Replies)
Discussion started by: scandora
3 Replies
4. Shell Programming and Scripting
The date construct in UNIX can be used to calculate when something is finished: date -v+1H displays the time 1 hour from now.
I want to use the same construct in a script, but it is leading to error messages:
echo "Finished at: " `date -v+$durationH`
where $duration is calculated based on input... (3 Replies)
Discussion started by: figaro
3 Replies
5. Shell Programming and Scripting
I have an awk script, and want to introduce a time delay. How can I do this? (3 Replies)
Discussion started by: kristinu
3 Replies
6. Shell Programming and Scripting
Hi All,
I have the following time stamp data in 2 columns
Date TimeStamp(also with milliseconds)
05/23/2012 08:30:11.250
05/23/2012 08:30:15.500
05/23/2012 08:31.15.500
.
.
etc
From this data I need the following output.
0.00( row1-row1 in seconds)
04.25( row2-row1 in... (5 Replies)
Discussion started by: ks_reddy
5 Replies
7. Emergency UNIX and Linux Support
Hi All,
I have solaris-11 global and multiple non-global zones running, which all are on same network. They are not in NIS. When we open putty session and give user-name, it takes long time in asking password (around 40-50 seconds) on Global zone. While on non-global zones, it is working... (9 Replies)
Discussion started by: solaris_1977
9 Replies
8. Shell Programming and Scripting
Hi All,
I want to run a utility for all the process id that are running for more than 15 mins.
I have captured process id's and the time that they were run in a file like below
1st column represnts the process ids and the 2nd one is the Time
<
21014 01:00
21099 01:00
24361 01:03
24406... (5 Replies)
Discussion started by: r_t_1601
5 Replies
9. Shell Programming and Scripting
I have a BASH script that runs a continuous loop, reading a line from a file, and then spawning a background process to use it. I've placed "date" commands inside it to see where it's slowing down, and everything inside -- including reading the line from the file -- is fast, but the loop bogs... (34 Replies)
Discussion started by: gmark99
34 Replies
10. UNIX and Linux Applications
Hi all,
I would like some help with a sendmail problem:
We have a new system comprising of 4 T7-1 servers, each hosting 5 LDOMs, all domains running Solaris 11.3
All emails sent from every one of these domains (including the control domains) sit in the queue for 3 mins 11 secs (sometime 3m 12s,... (11 Replies)
Discussion started by: Mysturji
11 Replies
LEARN ABOUT PHP
time_nanosleep
TIME_NANOSLEEP(3) 1 TIME_NANOSLEEP(3)
time_nanosleep - Delay for a number of seconds and nanoseconds
SYNOPSIS
mixed time_nanosleep (int $seconds, int $nanoseconds)
DESCRIPTION
Delays program execution for the given number of $seconds and $nanoseconds.
PARAMETERS
o $seconds
- Must be a non-negative integer.
o $nanoseconds
- Must be a non-negative integer less than 1 billion.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
If the delay was interrupted by a signal, an associative array will be returned with the components:
o seconds - number of seconds remaining in the delay
o nanoseconds - number of nanoseconds remaining in the delay
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.0 | |
| | |
| | This function is now available on Windows plat- |
| | forms. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
time_nanosleep(3) example
<?php
// Careful! This won't work as expected if an array is returned
if (time_nanosleep(0, 500000000)) {
echo "Slept for half a second.
";
}
// This is better:
if (time_nanosleep(0, 500000000) === true) {
echo "Slept for half a second.
";
}
// And this is the best:
$nano = time_nanosleep(2, 100000);
if ($nano === true) {
echo "Slept for 2 seconds, 100 microseconds.
";
} elseif ($nano === false) {
echo "Sleeping failed.
";
} elseif (is_array($nano)) {
$seconds = $nano['seconds'];
$nanoseconds = $nano['nanoseconds'];
echo "Interrupted by a signal.
";
echo "Time remaining: $seconds seconds, $nanoseconds nanoseconds.";
}
?>
SEE ALSO
sleep(3), usleep(3), time_sleep_until(3), set_time_limit(3).
PHP Documentation Group TIME_NANOSLEEP(3)