Config File with ksh


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Config File with ksh
# 1  
Old 10-20-2008
Config File with ksh

I want to read a config file with a few variables in it

like this

Code:
#include <bretest.config>

the content of the file should be more or less

Code:
String1="abc"
String2="DEf"

or whatever. How can I do this (this with #include ... doesn't work...) ?

Thanks for your help
Lucae
# 2  
Old 10-20-2008
Code:
source bretest.config

or
Code:
. bretest.config

# 3  
Old 10-20-2008
it works

Thanks very much..! Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Apache virtual host config vs global config problem

Hi folks, I am trying to configure Apache webserver and also a virtual host inside this webserver. For Global server config: /var/www/html/index.html For virtual host config: /var/www/virtual/index.html Both client10 & www10 are pointing to 192.168.122.10 IP address. BUT, MY... (1 Reply)
Discussion started by: freebird8z
1 Replies

2. Shell Programming and Scripting

Shell script that will compare two config files and produce 2 outputs 1)actual config file 2)report

Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated. script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made. OS :Susi linux ver 10.3. ... (4 Replies)
Discussion started by: muraliinfy04
4 Replies

3. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

4. Shell Programming and Scripting

Need help parsing config file in ksh

Hi all, I've done some searching here but haven't found exactly what I'm looking for so I thought I'd post up and see if someone can help out. I'm working on a shell script that I would like to store environment variables in an external file. I'm familiar with sourcing a file with variables in... (1 Reply)
Discussion started by: kungfusnwbrdr
1 Replies

5. Shell Programming and Scripting

parsing config file to create new config files

Hi, I want to use a config file as the base file and parse over the values of country and city parameters in the config file and generate separate config files as explained below. I will be using the config file as mentioned below: (config.txt) country:a,b city:1,2 type:b1... (1 Reply)
Discussion started by: clazzic
1 Replies

6. Solaris

Placing a config file

Hi all, I need to place a custom configuration file for a script/program that will likely be sitting in /usr/sbin, but I am unsure of exactly where to place it. In RHEL was told the config file should be in /etc/sysconfig, but no such directory exists in Solaris. Will my config file simply sit... (5 Replies)
Discussion started by: Rocket2DMn
5 Replies

7. Shell Programming and Scripting

Perl config file Help

Hi can anyone help me understanding the following code my %config; open my $config, '<', 'config.txt' or die $!; while(<$config>) { chomp; (my $key, my @value) = split /=/, $_; $config{$key} = join '=', @value; } (5 Replies)
Discussion started by: Harikrishna
5 Replies

8. Shell Programming and Scripting

Extracting data from text file based on configuration set in config file

Hi , a:) i have configuration file with pattren <Range start no>,<Range end no>,<type of records to be extracted from the data file>,<name of the file to store output> eg: myfile.confg 9899000000,9899999999,DATA,b.dat 9899000000,9899999999,SMS,a.dat b:) Stucture of my data file is... (3 Replies)
Discussion started by: suparnbector
3 Replies

9. Shell Programming and Scripting

using config file

Hello I got script where is defined path name, connect string to database and name of the log file. I would like to create a new config file which will be consists of these path name, connect string and name of the log file. But I don't know how to use this config file into the main... (1 Reply)
Discussion started by: mape
1 Replies

10. Solaris

bash and its config file

Guys im using bash and for me i think its the best shell, anyway which conf file related to bash ? is it $SHELL or .profile i want to add path to it so i dont need to type the full path of the binary file, i also want to configure the behaviour of the shell, please help. (1 Reply)
Discussion started by: XP_2600
1 Replies
Login or Register to Ask a Question