jump to a section in output


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting jump to a section in output
# 1  
Old 07-26-2012
jump to a section in output

HI I have the following output from an autosys command .
Now I would like to investigate further .i.e

Code:
                                                                                                  Start   Dependent
Job Name                                                         Status         Date Cond?        Cond?     Jobs?
--------                                                         ------      ---------------      -----   ---------
fiusdcvref_bbg_mtg_fnma_box                                      INACTIVE    No                   Yes     Yes

   Condition: success(fiusdcvref_bbg_finonnamr_box) OR
   (success(fiusdcvref_bbg_extbo_start_box) AND
   success(fiusdcvref_cycle_satday_box))

   Atomic Condition                                                              Current Status T/F
   ----------------                                                              -------------- ---
   success(fiusdcvref_bbg_finonnamr_box)                                         INACTIVE       F
   success(fiusdcvref_bbg_extbo_start_box)                                       INACTIVE       F
   success(fiusdcvref_cycle_satday_box)                                          INACTIVE       F

so from this out put ,shell should jump directly to the atomic condition section and if anything under the T/F section is F the it has to take the job name and do the jd of that job.I am trying to use the grep command for this .please advise is there any easy way to do this?
# 2  
Old 07-26-2012
Code:
jdc jobname | awk -F"[)(]" '/\)/ && / *F$/{system("autorep -q -J " $2)}'

# 3  
Old 07-30-2012
pls explain

HI ,

could you please explain the command in details for me ?

cheers,
sri
# 4  
Old 07-31-2012
Code:
 
-F"[)(]"  - field seperator is either ) or (
 
'/\)/  - line which is having )
 
&&  - and condition
 
/ *F$/ - same line should be end with F
 
{system("autorep -q -J " $2)}' - issue the autorep command

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Jump to next element in a loop

Hi, i want the loop to move to 3rd item, when it encounters 2 while runing for i in 1 2 3 4 5 6 do if then #jump to element 3 else echo $i fi done o/p 1 3 4 5 6 (4 Replies)
Discussion started by: sam05121988
4 Replies

2. Shell Programming and Scripting

Prepend first line of section to each line until the next section header

I have searched in a variety of ways in a variety of places but have come up empty. I would like to prepend a portion of a section header to each following line until the next section header. I have been using sed for most things up until now but I'd go for a solution in just about anything--... (7 Replies)
Discussion started by: pagrus
7 Replies

3. Solaris

Jump Start vs Flash Archive

Hi I'm trying to understand the difference between installation methods of Solaris 10, Jump Start vs Flash Archive ? thx for help. (6 Replies)
Discussion started by: presul
6 Replies

4. Shell Programming and Scripting

how to jump a shell !!

Hi, can someone point out a solution to my problem below. Within a shell script TEST.ksh I have to run two commands CmdA & CmdB one after the other as below. ------------- TEST.ksh #!/usr/bin/ksh A B ------------- I am running this script from KSH with PID 12345 as below. ... (5 Replies)
Discussion started by: krishnaux
5 Replies

5. Shell Programming and Scripting

Format output from the file to extract "date" section

Hello Team , I have to extract date section from the below file output. The output of the file is as shown below. I have to extract the "" this section from the above output of the file. can anyone please let me know how can we acheive this? (4 Replies)
Discussion started by: coolguyamy
4 Replies

6. Shell Programming and Scripting

Extract section of file based on word in section

I have a list of Servers in no particular order as follows: virtualMachines="IIBSBS IIBVICDMS01 IIBVICMA01"And I am generating some output from a pre-existing script that gives me the following (this is a sample output selection). 9/17/2010 8:00:05 PM: Normal backup using VDRBACKUPS... (2 Replies)
Discussion started by: jelloir
2 Replies

7. Shell Programming and Scripting

Output section of file between two expressions multiple times

Attached is the exact ouput of a vmware VDR log file I am working with but what I am trying to achieve is as follows: I need to output sections of the file using the string "Normal backup" as the start and "Duration" as the end to seperate files so I can then manipulate them further to create... (2 Replies)
Discussion started by: jelloir
2 Replies

8. AIX

jump in a .KSH batch

hi everyone, i need to know if is that possible insert in a batch KSH a "GO TO" sentence to jump at the top or at the end of the job. e.g. top: step1 step2 go to top: thanks in advance (4 Replies)
Discussion started by: enge
4 Replies

9. Shell Programming and Scripting

help - script can check jump sequence?

Hi, if I have a lot of files like (AABBCC0010, AABBCC0011, AABBCC0012....AABBCC1000), can I write a small script to check any sequence number jump and show me the result which sequence number? #The first sequence may start from 0010 or 0101... :confused: Thank you!! (10 Replies)
Discussion started by: happyv
10 Replies

10. Shell Programming and Scripting

Jump to a specific place in a file?

If I cat a file And want to go to the first instance of a particular value - what command would I use? And then from that point where I jumped to search for another value - but only search from that point forward not before the file? Thanks~ (2 Replies)
Discussion started by: llsmr777
2 Replies
Login or Register to Ask a Question