localtime() has actually two representations, array and scalar.
By assigning it to a $variable the scalar representation is forced.
Certain functions like print can handle both representations, so a cast to scalar is necessary:
Dear UNIX Folks,
I guess everyone of us like to know what sysadmin typically do during his free time.
Not what he/she likes as an hobbies.. but what activities does he/she often indulge in other than facing the monitor.
Maybe we can come up this a better stereo-typed for sysadmin.
I... (8 Replies)
hi ,
I would like to ask how to get past 5 minutes system time and date, if i have following to get current time.
# get current time
($sec,$min,$hour,$mday,$mon,$year) = localtime(time);
$year = $year + 1900;
$mon = sprintf ("%02s",$mon+1);
$mday = sprintf ("%02s",$mday);
$hour =... (1 Reply)
Hello
I have a question that may sound stupid after and maybe it is.
We are syncing our sytem time via ntp from a reference time server. all works quite well
but due to a mall applikation which not accepts timestamps from our servers that in the future,
and if it even was 1 ms, we have to... (1 Reply)
Hi guys,
Im trying to subtract time in ksh script. i.e. basically im querying a database and i want to get the time 10mins before hand..(from)
in ksh
CurrMin=$(date "+%M")
from=`expr $CurrMin - 10`
to=$CurrMin
however if i run this i say at 2 or 3 mins past the hour, i.e.... (7 Replies)
Hey everyone,
I need to select all files that were added to a specific directory in the past 5 mins and copy them over to a different directory. I am using HP-UX OS which does not have support for amin, cmin, and mmin. B/c of this, I am creating a temp file and will use the find -newer command... (7 Replies)
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)
Dears,
I am looking for a script which will work as a watch directory.
I ha directory which keep getting files in every 10 mins and some time delay.
I want to monitor if the directory getting the files in every 10 mins if not captured the last received file time and calculate the delay.
... (6 Replies)