problem to read the file in directory from conf

I am facing a problem about read a file from the configuration file

configuration file name :-  config2010File.conf       it consist
"[config]
log=./log/processEDI.log
incomingdir=/v1/jing/edi/Incoming    <-- path
processdir=/v1/jing/edi/Processed
"

In my program need to read "incomingdir" to know the location to read the file. In incomingdir the file name always in different one.
Anyone have idea how to read it?

ryanWAsked:
Who is Participating?
 
TintinCommented:
Assuming bash, based on your tags.


#!/bin/bash
CONFIG=/path/to/config2010File.conf

eval $(grep "^[a-z]" $CONFIG)
echo $incomingdir

Open in new window

0
 
TintinCommented:
The above solution will also give you access to $log and $processdir
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.