***** Parameter file in a shell script *****

  • From: Oracle DBA <iamanoracledba@xxxxxxxxx>
  • To: List <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 1 Mar 2004 22:56:04 -0800 (PST)

Hi All,
I need an urgent help with a complex situation. I really appreciate your help! 
I have a parameter file like this. 
unix> cat script.par
name=david
city=phoenix
job=(admin,manager)
admin_role=(calls,meetings,gusts)
manager_role=(meetings,workers)
age=60 
I have to use the above parameters in a shell script. Since the number of 
parameters are high I can't pass them as $1.. $10 etc in the command prompt. 
Number of parameters in script.par can vary. 
In the shell script I need to read the values in script.par and assign them to 
different variables as shown below! 
name=david
city=phoenix
job_1=admin
job_2=manager 
admin_role_1=calls
admin_role_2=meetings
admin_role_3=gusts 
manager_role_1=meetings
manager_role_2=workers 
age=60 
Please let me know how to achieve this. I hope I am clear on my questions. I 
appreciate your help. 
Thank you so much! 
Have a great day,
Sam



---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what you?re looking for faster.

Other related posts: