LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 10-28-2003, 10:12 AM   #1
steevy18
LQ Newbie
 
Registered: Oct 2003
Posts: 1

Rep: Reputation: 0
Unhappy Bash - Using variable from a .conf file


Helle I have a conf file name tp4backup.conf
this is the file :

SERVICE="srvtest"

[servtest]
PRE_CMD="allo"
[/servtest]

Ok now, from a .sh script, how can I use my variable defined in the .conf file....

Please help me
Thanks
steve
 
Old 10-28-2003, 12:58 PM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
source the conf file in your script.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading a conf file from a BASH script dinolinux Programming 5 08-03-2005 05:18 AM
bash, how to get variable name from variable Duudson Programming 6 01-06-2005 05:38 PM
get file contents with newlines into bash variable otoomet Linux - Software 2 01-06-2005 02:23 PM
Variable with bash pinkysioux Programming 6 04-15-2004 09:46 PM
BASH variable export Barbarian Programming 2 11-27-2001 09:37 PM


All times are GMT -5. The time now is 07:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration