Advertisement

04.20.2008 at 12:12PM PDT, ID: 23338024
[x]
Attachment Details

parsing a file in shell script

Asked by saibsk in KornShell (ksh)

I am writing a shell script. I need to parse a file which has following contents

insert_job: DL_EACP_Generic_Load   job_type: c
box_name: DL_EACP_Generic_Box
command: /Loader.sh /opt/Loader.pl --appiaAbbrev GenericLoader --clientDir ECP_Generic --productName GenericLoader --FileName ECAP_Generic_config
std_out_file: $HOME/logs/DL_ECP_Generic.$$YYYYMMDD.txt
std_err_file: $HOME/logs/DL_ECP_Generic.$$YYYYMMDD.txt
alarm_if_fail: 1
max_exit_success: 99
profile: /export/home/user/.profile
job_load: 80
priority: 1

I need to retrieve the clientDir which is ECP_Generic and the Filename which is ECAP_Generic_config in the above case. Please advise.Start Free Trial
 
Keywords: parsing a file in shell script
 
Loading Advertisement...
 
[+][-]04.20.2008 at 12:40PM PDT, ID: 21397323

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: KornShell (ksh)
Sign Up Now!
Solution Provided By: ozo
Participating Experts: 4
Solution Grade: A
 
 
[+][-]04.20.2008 at 01:00PM PDT, ID: 21397394

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.20.2008 at 04:26PM PDT, ID: 21397968

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 01:01AM PDT, ID: 21418465

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628