I need to edit a config file using shell script. i.e., Search with the 'key' string and edit the 'value'.
For eg: below is what I have in the config file "configfile.cfg".
Key1=OldValue1
Key2=OldValue2
I want to search for "Key1" and change "OldValue1" to "NewValue1"
Thanks for your... (7 Replies)
I'm writing a shell script. I want to put the variables in a separate config files and use those inside my script.
e.g. the config file (temp.conf)will have the values like
mapping=123
file_name=xyz.txt
I want to access these variables in temp.conf(i.e. mapping and file_name) from inside the... (7 Replies)
Hi there, am trying to parse an Apache 'server' config file. A snippet of the config file is shown below:
.....
ProxyPassReverse /foo http://foo.example.com/bar
.....
.....
RewriteRule ^/(.*) http://www.example.com/$1
RewriteRule /redirect https://www.example1.com/$1
........ (7 Replies)
Hi,
I have a config file that has blank, commented lines. I need to escape commented lines, blank lines, parse the remaining lines and store them in variables or array.
the config file contains the following lines.
# config file
# Define Oracle User
ORA_USER=abcde
ORA_PASS=xyzabc... (8 Replies)
I have a script with few pre defined variables.
Also have a config file. Something like this.
# config file
# Define Oracle User
MOD1_TAG=abcde
MOD2_TAG=xyzabc
MOD3_TAG=def
I need to parse the config file and have each of the value copied to different variables.
Please suggest what... (1 Reply)
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)
Hi, I have a script that interacts with a config file in the format:
file1.txt
file2.txt
file3.txt
file4.txt
file5.txt
file6.txt
I would like to return the Category, when given the file name. (11 Replies)
Dear Unix gurus,
We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Dear Unix gurus,
We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies
LEARN ABOUT DEBIAN
config::any::ini
Config::Any::INI(3pm) User Contributed Perl Documentation Config::Any::INI(3pm)NAME
Config::Any::INI - Load INI config files
DESCRIPTION
Loads INI files. Example:
name=TestApp
[Controller::Foo]
foo=bar
[Model::Baz]
qux=xyzzy
METHODS
extensions( )
return an array of valid extensions ("ini").
load( $file )
Attempts to load $file as an INI file.
requires_all_of( )
Specifies that this module requires Config::Tiny in order to work.
PACKAGE VARIABLES
$MAP_SECTION_SPACE_TO_NESTED_KEY (boolean)
This variable controls whether spaces in INI section headings will be expanded into nested hash keys. e.g. it controls whether [Full
Power] maps to $config->{'Full Power'} or $config->{'Full'}->{'Power'}
By default it is set to 1 (i.e. true).
Set it to 0 to preserve literal spaces in section headings:
use Config::Any;
use Config::Any::INI;
$Config::Any::INI::MAP_SECTION_SPACE_TO_NESTED_KEY = 0;
AUTHORS
Brian Cassidy <bricas@cpan.org>
Joel Bernstein <rataxis@cpan.org>
COPYRIGHT AND LICENSE
Copyright 2006-2011 by Brian Cassidy, portions copyright 2006, 2007 by Joel Bernstein
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
o Catalyst
o Config::Any
o Config::Tiny
perl v5.14.2 2011-05-25 Config::Any::INI(3pm)