Regarding Changes in jil scripts


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Regarding Changes in jil scripts
# 1  
Old 09-08-2007
Regarding Changes in jil scripts

Hi
i have taken a jil and i am placing the file name as a1.jil
and a1.jil contains the following things

/* ----------------- sample_ls ----------------- */

insert_job: sample_ls job_type: c
command: ls -l
machine: unixboxa
owner: user123@unixboxa
permission: wx,mx,we,me
description: "runs an ls -l as user123"
job_terminator: 1
alarm_if_fail: 1

i just need to change the machine name , alarm if fails and owner id thrugh unix shell scripting can any one help me on this ..

Just need to kick off the unix script and it need to prompt me with instance id , owner id , alarm if fail and it should ask for user entry

Thank a lot !!
# 2  
Old 09-10-2007
If you only need to change a previous jil code use sed , perl ,etc.
Ex:
Code:
sed -e s/machine: unixboxa/machine: lamaqina/ a1.jil

If you are asking for an interactive script:
1) Determine if the user is going to update an existing jil or create a new one .

2) Ask for the jil variable statements.

3) compound the jl.
Ex:
Code:
jilGen ()
{
cat <<EOF
insert_job: "${JOB}" 
job_type: "${TYPE}"
command: "${COMMAND}"
machine: unixboxa
owner: user123@unixboxa
permission: wx,mx,we,me
description: "${DESCR}"
alarm_if_fail:"${ALARM}"
EOF
}

4) Apply it.

Regards
# 3  
Old 09-11-2007
Hey

Thanks for the reply


lets assume i have two jil in a single file

a1.txt

/* ----------------- sample_ls ----------------- */

insert_job: sample_ls job_type: c
command: ls -l
machine: unixboxa
owner: user123@unixboxa
permission: wx,mx,we,me
description: "runs an ls -l as user123"
job_terminator: 1
alarm_if_fail: 1

/* ----------------- jil.jil ----------------- */

insert_job: sample_ls job_type: c
command: ls -l
machine: unixboxa
owner: user123@cous123
permission: wx,mx,we,me
description: "runs an ls -l as user123"
job_terminator: 1
alarm_if_fail: 1


i need to search for a string "cous123" once i found this thing , i need to remove the lines which are example , naturally it would be 6 lines above it and 4 lines below it . So my output should be only like this ::

a2.txt

/* ----------------- sample_ls ----------------- */

insert_job: sample_ls job_type: c
command: ls -l
machine: unixboxa
owner: user123@unixboxa
permission: wx,mx,we,me
description: "runs an ls -l as user123"
job_terminator: 1
alarm_if_fail: 1
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Autosys adding global variable in a jil

I have created two jil files name AY.jil and PY.jil. I have three issues which are as follows: 1. how do you add a global variable value from a shell script program to a jil file? 2. PY.jil needs to check every five minutes on the completion of the AY.jil jobs and AY.jil needs to... (1 Reply)
Discussion started by: dellanicholson
1 Replies

2. UNIX for Beginners Questions & Answers

Add global variable to jil autosys

I am new to autosys. I want to add a global variable to a jil file named PJ.jil. I also want to add a watch_file command to filename PJ.jil and AY.jil. The watch_file command checks every five minutes if the jobs have completed. For example. AY.jil needs to wait until all the jobs in PJ.jil have... (0 Replies)
Discussion started by: dellanicholson
0 Replies

3. Shell Programming and Scripting

Need to extract jil file details in a excelsheet

I am very new to shell scripting. I have a autosys jil file that looks like :-- /* ------------- JOB1 ------------------ */ insert_job: JOB1 job_type: b owner: cm@pelonmuck permission: gx,ge,wx,we,mx,me date_conditions: 1 days_of_week: mo,tu,we,th,fr,su start_time: "18:30"... (9 Replies)
Discussion started by: newbie_shell
9 Replies

4. Shell Programming and Scripting

awk to parse jil output

Hi , I have a jil file which i am trying to parse and print the job name and the condition corresponding to it. Below is the input file /* -------------------- testjob1 -------------------- */ insert_job: testjob1 job_type: c machine: unix owner: chidori condition: s(joba) and... (9 Replies)
Discussion started by: chidori
9 Replies

5. Shell Programming and Scripting

awk - Parsing Autosys JIL

I'm trying to modify the script given in post 7 of the following thread: 146564-need-parse-jil-file-into-excel-file.html. (Sorry, can't post the URL as I don't have enough posts.) The original script is as follows: awk -F ' *_]*: *' 'BEGIN ... (9 Replies)
Discussion started by: GnuScripter
9 Replies

6. UNIX for Advanced & Expert Users

Autosys: Check the jil load time

Hi All, I wanted to know what time the box jobs were loaded into a particular Autosys Instance. Is there a autosys command to find out the above? (The timestamp at which a box was loaded) I had loaded my JIL script without outputting it to the log file. (4 Replies)
Discussion started by: grep_me
4 Replies

7. UNIX for Advanced & Expert Users

Autosys JIL script for logging

Hi I'm very new to this Autosys JIL scripts. Now I need to create an Command to copy the file from one folder to another by watching that folder. I have written & create that job but i don't no how to add logging in JIL script. Before moving the file i have to log the file details in a separte... (0 Replies)
Discussion started by: vijayvz
0 Replies

8. Shell Programming and Scripting

execute a .jil file

hello all, Could anyone please suggest me as to how could we execute a .jil file. Thanks in advance for your help. (4 Replies)
Discussion started by: OSD
4 Replies

9. UNIX for Advanced & Expert Users

execute a .jil file

Hi All, Could anyone suggest me as to how could we execute a .jil file. Thanks in advance. (1 Reply)
Discussion started by: OSD
1 Replies

10. UNIX for Advanced & Expert Users

Regarding Changes in jil scripts

Hi i have taken a jil and i am placing the file name as a1.jil and a1.jil contains the following things /* ----------------- sample_ls ----------------- */ insert_job: sample_ls job_type: c command: ls -l machine: unixboxa owner: user123@unixboxa permission: wx,mx,we,me... (0 Replies)
Discussion started by: ranga27
0 Replies
Login or Register to Ask a Question