I received the solution Tintin. Thanks a lot I appreciate your help. I will be posting the entire solution once I add a few more parts to it.
Main Topics
Browse All TopicsI 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.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: TintinPosted on 2008-04-15 at 22:12:26ID: 21364962
What is the format of store_to_dm.cfg?
You say you want the script to read and write to the configuration. Did you really mean that?
What's the relationship of the div_code and the section of the configuration file to read?
Some sample data and expected output would be really useful.