The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 05-30-2007
LiquidChild LiquidChild is offline
Registered User
  
 

Join Date: Jul 2005
Location: Belfast
Posts: 49
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
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:11 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0