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 !!

If you only need to change a previous jil code use sed , perl ,etc.
Ex:

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:

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

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