I have a requirement to calculate the difference of number of days of time stamp of a file and system date and if the difference is greater than 15 days it should prompt as previous month file otherwise current month file.
Below is the code i used and it is working fine till now. (You can try some date instead of $Publish_Time, it actually carries time stamp of a file)
From today since there is change in year, time stamp difference is going negative value and hence even with Dec 1 time stamp it is prompting as current month file.
Hi,
I has created the shell script in HP_UX 11.23 and using the command, echo $(date +%Y%m%d%H%M%S) > $DIR/alert, placing the time of running the script into a file alert.
I want to compare the time in the above file alert with the current time.If difference is more than 5 min, then print the... (7 Replies)
Hello all :)
I need some help; I'm running the sp_spaceused command on various tables and saving the output to a file. So, I have an input file that has 3 rows - each row has 7 columns. I would like to 1) sort the file on the 4th column, 2) take the 4th column in the first row and add 25% to... (2 Replies)
Hi,
I have a file with the contents as following
Access Time: Thu Nov 6 16:43:45 2008
Modify Time: Thu Nov 6 16:43:45 2008
Change Time: Thu Nov 6 16:43:45 2008
Access Time: Thu Nov 6 16:43:02 2008
Modify Time: Thu Nov 6 16:44:01 2008
Change Time: Thu Nov 6 16:44:01 2008
I need... (3 Replies)
Hi All
I like to know how can we calculate the number of rows and the average of the values present in the file. I will not know what will be the rowcount, which will be dynamic in nature of the file.
eg.
29
33
48
30
28 (6 Replies)
Hello!
i need to find files lower and bigger that one date i pass, i search in the man find, but i didn't find anything, the only that i find is the parameter -mtime, in this parameter i can pass a number of days, but i need to know the difference between dates, any built-in function for do... (15 Replies)
Hi,
I have CSV file which looks like below, i want to calulate number of records for each brand say SOLO_UNBEATABLE E and SOLO_UNBEATABLE F combined and record count is say 20 . i want to calculate for each brand, and here only first record will have all data and rest of record for the brand... (2 Replies)
Hi
I have shell script and I am facing the below issue to integrate the date calculation to the the script.
If I give the $1 as the date(20110701) then I need to get the 7 days ago date for the same format.(20110624).
At first I thought its a simple one to handle and I did a search in the... (10 Replies)
A report needs to come some what similar to this
No of elements Stream Batch No Load time
A B C D
A,B,C im able to get quite easily
wc -l /usr/local/intranet/areas/prod/output/SRGW_0?/*/MESSAGE_T.dat
O/P of above command.
A B C ... (1 Reply)
Hi,
I am not comfortable with dates and I fail to crack this.
I have two strings
Date1="Apr 22 23:59:59 2016 GMT"
Date2="Dec 1 15:08:40 UTC 2015"
I need to find the difference in days between the two dates which in this example is approx 140 days.
Is there an easy way to get the... (3 Replies)
16:45:51 10051 77845
16:45:51 10051 77845
16:46:52 10051 77846
16:46:53 10051 77846
Match the last PID then subtract second line time with first line.
Please help me with any command or script.
working in media company on a project OS: RHEl7
tried command:
awk 'function... (2 Replies)
Discussion started by: vivekn
2 Replies
LEARN ABOUT HPUX
uucleanup
uucleanup(1M)uucleanup(1M)NAME
uucleanup - uucp spool directory clean-up
SYNOPSIS
time] time] time] time] string] time] system] debug_level]
DESCRIPTION
The commands, including are targeted for removal from HP-UX; see the below.
scans the spool directories for old files and takes appropriate action to remove them. Depending on the options selected, performs the
following:
o Informs the requestor of send and/or receive requests for systems that cannot be reached.
o Returns mail that cannot be delivered to the sender.
o Removes all other files.
In addition, warns users of requestors who have been waiting for a given number of days (the default is 1 day). Note that unless time is
specifically set, the default time values for the following options are used.
Options
recognizes the following options:
Any files greater or equal to time days old are removed with appropriate information to the requestor. The default time
is 7 days.
Any files greater or equal to time days old are removed. An attempt is made to deliver mail messages and execute news
when appropriate. The default time is 7 days.
Any files equal to time cause a message to be mailed to the requestor warning about the delay in contacting the remote.
The message includes the JOBID, and in the case of mail, the mail message. The administrator can include a message
line telling who to call to correct the problem (see the option). The default time is 1 day.
Any files greater than or equal to time days old are removed. The files are probably not present (if they were, the
could be executed). But, if files are present, they are taken care of by processing. The default time is 2 days.
This string is included in the warning message generated by the
option. The default string is
Other files whose age is more than
time days are deleted. The default time is 2 days.
Clean-up the spool directory for
system only. The default is to clean-up all spool directories.
The debug level is a single digit between 0 and 9.
The higher the numbers, the more detailed the debugging information returned.
This program is typically started by the script which should be started by (see cron(1M)).
WARNINGS
Use of commands, including is discouraged because they are targeted for removal from HP-UX. Use ftp(1) or rcp(1) instead.
FILES
spool directory
SEE ALSO cron(1M), uucp(1), uux(1), uuclean(1M).
Tim O'Reilly and Grace Todino,
O'Reilly & Associates, Inc. USA.
Grace Todino and Dale Dougherty,
O'Reilly & Associates, Inc. USA.
TO BE OBSOLETED uucleanup(1M)