![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| Shell Script: want to insert values in database when update script runs | ring | Shell Programming and Scripting | 1 | 10-25-2007 03:06 AM |
| writing script file for database | shaksing | Shell Programming and Scripting | 3 | 07-26-2007 08:30 AM |
| getting dump from database by UNIX script | arunkumar_mca | Shell Programming and Scripting | 1 | 07-13-2006 12:27 PM |
| Script to connect to As400 database | mgirinath | Shell Programming and Scripting | 0 | 12-01-2005 04:20 PM |
| Starting a script from a Database procedure | vidireporting | UNIX for Advanced & Expert Users | 4 | 01-21-2002 07:25 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Database drive script
I have decided to use a database table to allow the user to configure how my script should function, i.e. what menu options to display etc, and hold variable values in the table instead of a script. This means moving into different environments they should just be able to copy the script and then alter the database table without having to worry about changing code etc.
My question really is, is this possible? I would like to read all the values in the table and put them in a variable with the same name, so that should i wish to just use a new variable all that needs to be done is to add it to the table and then it can be referenced in my scripts as a variable, since the code for reading the table would populate all the variables and give them the same name. So for example my table is a name/value pair table and has: SHOW_SQL_MENU Y SHOW_LOG_MENU Y Then in my scripit I can have something like if [ "$show_log_menu" == "Y" ] then ; else ; fi Can anyone let me know if this is going to be a major thing to do, also any suggestions on how to do it? Thanks |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|