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
How to read the configuration file from shell script nishanth hampal Shell Programming and Scripting 7 02-27-2008 03:42 AM
Shell Script: want to insert values in database when update script runs ring Shell Programming and Scripting 1 10-25-2007 03:06 AM
Need Shell Script to upload data from Text file to Oracle database chandrashekharj Shell Programming and Scripting 6 03-26-2007 03:21 AM
sh script that reads/writes based upon contents of a file rdudejr Shell Programming and Scripting 3 07-12-2006 10:38 AM
Shell Script to Load data into the database using a .csv file and .ctl file Csmani Shell Programming and Scripting 3 05-24-2006 08:09 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 04-15-2008
dolo21taf dolo21taf is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 6
Shell script that reads from configuration file to get database

Hi intelligent beings,

I am trying to write a script that
1. Accepts the following arguments:
store_number
div_number
user_id
div_code

2. Will read from a configuration file to get the Database

3. Use the div_code to determine which value to retrieve from the configuration file

So far the first part of it I wrote as:

store_number=$1
div_number=$2
user_id=$3
div_code=$4

The script to write to the configuration file was written like this:

getline<"store_to_dm.cfg" -------> store_to_dm.cfg is configuration file that I also create

The statement above should be able to read from the configuration file, but how can it get the database out of it?

The third part I just need help in because I am stuck on that part. Please help!!!

Overall for the script I have:
#!/bin/sh
store_number=$1
div_number=$2
user_id=$3
div_code=$4

getline<"store_to_dm.cfg"

Thanks in advance.
 

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 09:54 AM.


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