Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Pulling Parms from Config File

$
0
0
Hello all,

I'm working on a general script for something at work. I'm an up-and-comer backup for a Shell Scripter this company has had for 35 years lol. Anyway, I have a config file I'm trying to pull Variables from as the Config File is used for multiple scripts. Does the below make sense and is there any better way to do this?

Config File:
Code:

DayOfWeek Fri
Script:
Code:

function GetConfigParms
{
    DayOfWeek=`grep DayOfWeek app.main.cfg | awk '{print $2}'`
}

I appreciate it!

Viewing all articles
Browse latest Browse all 16232

Trending Articles