![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Generate XML file from C++ | debu | High Level Programming | 2 | 08-04-2008 10:19 AM |
| To generate the FTP Script file | konankir | Shell Programming and Scripting | 1 | 04-01-2008 04:16 PM |
| Script to generate text file from excel file | isingh786 | UNIX for Dummies Questions & Answers | 1 | 01-24-2008 10:32 AM |
| Generate csv file | rahulrathod | Shell Programming and Scripting | 4 | 01-23-2007 10:34 AM |
| How to generate an image file from FD | Esteban | UNIX for Advanced & Expert Users | 1 | 12-22-2005 11:50 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Generate PARAMETERS from config file
Hi, I have a config file like below: Code:
config.cfg ========== PARAm_1_MIN=20 PARAM_1_MAX=40 PARAM_2_MIN=3 PARAM_2_MAX=40 PARAM_3_MIN=0 PARAM_3_MAX=4.5 ..... ... ... PARAM_N_MIN=20 PARAM_N_MAX=30 I need to write a shell script which reads this file and generated a variable PARAM_1 = (PARAM_1_MIN + PARAM_1_MAX)/2 Code:
for entry PARAM_1_MIN = 30 PARAM_1_MAX = 60 I should have a variable ( can be an array) PARAM_1 or PARAM[1]= (PARAM_1_MIN + PARAM_1_MAX)/2 and so for all the other PARAMETERS in the config.cfg file. based on the number of arguments we have we should generated so many variables in the shell script. Could someone please help me how to do this. Thanks Sachin Last edited by sachin4sachi; 04-21-2009 at 07:14 PM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|