Sponsored Content
Top Forums Shell Programming and Scripting script for comparing the times. Post 302332023 by intiraju on Wednesday 8th of July 2009 02:20:36 AM
Old 07-08-2009
Hi Thanks for the reply.
Please find the requiremtn below.

Backup status at Tue Jul 7 03:30:07 EDT 2009 CMLP

Job Name Last Start Last End ST Run Pri/Xit
____________________________ ____________________ ____________________ __ _______ ___

tnx415uu 07/06/2009 22:01:41 ----- RU 5547800/1
tnp415uu 07/06/2009 22:01:58 07/06/2009 22:02:54 SU 5547800/1
toebafuu 07/06/2009 22:05:58 07/06/2009 22:29:32 SU 5547800/1
tosbafuu 07/07/2009 02:32:03 07/07/2009 02:32:25 SU 5547800/1
3xibafuu 07/07/2009 02:32:36 07/07/2009 02:34:25 SU 5547800/1
tnbbafuu 07/07/2009 02:34:35 ----- RU 5547800/1
3xdbafuu ----- ----- AC 5547800/0
tnu415uu ----- ----- AC 5547800/0


Job Name Last Start Last End ST Run Pri/Xit
____________________________ ____________________ ____________________ __ _______ ___

HP_nu_db_process 07/06/2009 22:00:08 07/07/2009 02:33:27 SU 1023852/1
HP_nu6003ud 07/07/2009 02:30:31 07/07/2009 02:31:44 SU 1023852/1
HP_nu6007ud 07/07/2009 02:32:45 07/07/2009 02:33:18 SU 1023852/1
HP_nu6001ud 07/06/2009 22:00:21 07/06/2009 22:00:32 SU 1023852/1
HP_nu6005ud 07/07/2009 02:30:14 07/07/2009 02:30:16 SU 1023852/1



Hi Please find my requirement.

I will be delaring the variables and siignig the values. Below are the 8 values assigned to 8 variables.

1. HP_nu_db_process
2. HP_nu6001ud
3. tnx415uu
4. HP_nu6005ud
5. toebafuu
6. HP_nu6007ud
7. tosbafuu
8. HP_nu6003ud

now first i need to check the date and time of the first variable. the date has to be one day before. if it is true then i need to jump for the second variable and need to check the date and time.if it is true then i need to jump to third variable and check the date and time like this i need to check all the variables.
Please let me know if you dint understand.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help script for login times

I am new to shellscript . PLease help me how can I write the following script. $ who ray pts/0 aug 31 01:18 ( 65.169.28.200 ) ray pts/1 sep 2 02:28 ( 65.169.28.200 ) bob pts/3 sep 2 02:31 ( 65.169.28.201 ) when run the command who |./ script , the script should... (3 Replies)
Discussion started by: LAY
3 Replies

2. Shell Programming and Scripting

Awk script to add times.

Hey, Im trying to format the last command to tell me just the user names, logins, and the time that they were logged in. So far I got the users logins using a loop that counts the amount of times a user logged in but im not sure how to start the time array. The time im trying to use is the last... (2 Replies)
Discussion started by: Trilogie
2 Replies

3. AIX

how would you know your server was rebooted 3 times or 5 times

Is there such location or command to know how many times did you reboot your server in that particular day?in AIX. (3 Replies)
Discussion started by: kenshinhimura
3 Replies

4. UNIX for Dummies Questions & Answers

comparing two times

Hi Good Morning all, I have two dates and times in the beloe format. 1. 07/18/2009 03:45:49 2. 07/18/2009 03:46:41 i will grep these values from a file. Now my problem is i need to find out whether the second valus is bigger thatn the 1 value. How to compare the times. Please help me in... (4 Replies)
Discussion started by: intiraju
4 Replies

5. Shell Programming and Scripting

Shell script to run x times

Hi, First i need to cd to this directory $SWDIR/util Second i need to run the following either 4 times or 20 times ./swadm add_process 1 BG Y how can i put this in a script which should ask for user input on how many times you want to run this Thanks, (5 Replies)
Discussion started by: lookinginfo
5 Replies

6. Shell Programming and Scripting

Counting script how many times it run?

i should use this script runs how many times before ? how can i do_? (3 Replies)
Discussion started by: utoptas
3 Replies

7. UNIX for Dummies Questions & Answers

script help shell session times out

while read s1 ; do url= suf=ignore=.csv; wget $url$s1$suf; sleep 5; cat /home/joey/public_html/charts/program/fn\charts/data/tickers/header.txt > $s1.txt; chmod 777 $s1.txt; sed '1d' table.csv?s\=$s1 >> /home/joey/public_html/charts/program/charts/data/tickers/$s1.txt; rm -Rf... (0 Replies)
Discussion started by: harte
0 Replies

8. Programming

Problem with implementing the times() function in C (struct tms times return zero/negative values)

Hello, i'm trying to implement the times() function and i'm programming in C. I'm using the "struct tms" structure which consists of the fields: The tms_utime structure member is the CPU time charged for the execution of user instructions of the calling process. The tms_stime structure... (1 Reply)
Discussion started by: g_p
1 Replies

9. Windows & DOS: Issues & Discussions

Schedule script is not executing some times

Dear Experts, Once again i need your vital help to fix my issue, please do the needfull. Issue:- I have schedule one script on windows server to run's every 10 min.(Script do check the alert log file,if database found down it send the email) While i'm doing the database down manually its... (12 Replies)
Discussion started by: Mohammed Fareed
12 Replies

10. Windows & DOS: Issues & Discussions

Looping script several hundred times ?

Hi, I need to get a script to run over 100 of different files in a folder. The current input file is: (However the input file has to change by one counter each loop of the script(e.g. 001, 002, 003...)) 001.gif At the end of the scrip the current output is: 001output.gif It should... (4 Replies)
Discussion started by: pasc
4 Replies
uudemon(4)						     Kernel Interfaces Manual							uudemon(4)

NAME
uudemon.admin, uudemon.cleanu, uudemon.hour, uudemon.poll - Administrative shell scripts for polling remote systems, cleaning up spool directories, reporting status to the system administrator, and routine invocations of the uuxqt and uusched daemons SYNOPSIS
These shell scripts reside in the following directory: /usr/lib/uucp DESCRIPTION
All the scripts can be run from the command line or can be run automatically by the cron daemon. To automatically run the scripts, remove the comment character (#) from the beginning of the relevant line in the /var/spool/cron/crontabs/uucp file. This script reports status to the system administrator. It issues the uustat command to find out the status of uucp jobs. It mails the results to the uucp login ID. The script may be modified to send mail to any login ID such as the uucp administrative login ID (uucpa) or root. This script cleans up the /var/spool/uucp and /var/spool/uucppublic directories by running the uucleanup command. The uucleanup com- mand is run with the following parameters: -C7, -D7, X2, -o2, -W1. This script runs the uusched and uuxqt daemons in the background. This script polls the systems listed in the /usr/lib/uucp/Poll file. The uudemon.poll script should be scheduled before the uudemon.hour script. This allows uudemon.poll to create any command files before cron runs the uudemon.hour script. FILES
Contains the uudemon.admin, uudemon.cleanu, uudemon.hour and uudemon.poll files. Contains the uucp file. RELATED INFORMATION
Commands: cron(8), uucleanup(8), uusched(8), uuxqt(1) Files: /usr/lib/uucp delim off uudemon(4)
All times are GMT -4. The time now is 11:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy