hi; i have one configuration file(configuration.cfg),where contents are below..
There is multiple filename & section name's.
How i read filename and section name and also between lines in two diff. sections dynamically ?
Then search as per filename in config directory,if found,then search for section name,if found then append/insert the lines in that file in shell script(linux).
Last edited by Scott; 05-20-2010 at 02:02 PM..
Reason: Please use code tags
Hello Friends
I am new to this forum and this is my first post.
I have to write a script in which i have to read data from a configuration ( .cfg) file. And also i have to execute/call some already written scripts from this script.
Can you people plpease help me on this regards.
Thanks... (5 Replies)
Hi All,
I have a requirement to zip and compress files with dynamic names (which includes date and time component in their names) needs to be compressed with same name.
for example I have a file T.30.SLS_ORD.SO.27.2_2_2.20080623.041415.dat which needs to archived as... (1 Reply)
I am having a major problem. Most of the commands that i am running on my centos 5 system is giving the error of type:
<dynamic shared library file>:open failed: No such file or directory
For example:
libgcc_s.so.1: open failed: No such file or directory
How can i solve this? (6 Replies)
Dear Group,
I want to prepare an ELF file which can be downloaded dynamically to any address in the moemory and executes as a new task/thread/process.
1) for this what are all the compileation, linker options while building the ELF file?
2) which parts of ELF file has to modified while... (1 Reply)
hi
Howto configure Ralus at /usr/local/etc/be-agent.cfg on freeBSD 7.0 for Backup Exec 9.1?
I've tried the following:
# cat /usr/local/etc/be-agent.cfg
name bsd.domain
export / as root
export /usr as usr
export /var as var
export /tmp as tmp
force_address 10.10.1.50
tell... (0 Replies)
Hi Forum.
When I run the following find command, I get the desired results:
find . \( -name a.out -o -name '*.o' -o -name 'core' \) -type f -ls
I want for my script to dynamically calculate and assign a variable var1 to contain all the files that I want to search instead of hard-coding.
... (2 Replies)
i have automated installation of my proprietory linux.. using PXE. it all goes well. but after complete installation, while using the admin interface.. i am facing display problems.
is it due to package dependencies.?
or i have to write post script in anaconda-ks.cfg file???
can some one tell... (10 Replies)
Hi I have to run the script (a part of the code) in a loop for the no of times the files present in the directory, by taking one file and process and next another file.
For example, if we do ls and the result have:
$ls
abc.dat def.dat ghi.dat
The script code should loop for 3... (4 Replies)
Heyas
I'm trying to build a live image using livecd-tools (livecd-creator), but this time i'd like to reuse the /root/anaconda-ks.cfg.
System: Fedora 3.16.7-200.fc20.x86_64
The building starts, the download begins, but it fails with networking.
MAIN.ks
# Based on: fedora-live-base.ks... (0 Replies)
Discussion started by: sea
0 Replies
LEARN ABOUT REDHAT
apache::testconfig
Apache::TestConfig(3) User Contributed Perl Documentation Apache::TestConfig(3)NAME
Apache::TestConfig -- Test Configuration setup module
SYNOPSIS
use Apache::TestConfig;
my $cfg = Apache::TestConfig->new(%args)
my $fh = $cfg->genfile($file);
$cfg->writefile($file, $content);
$cfg->gendir($dir);
...
DESCRIPTION
"Apache::TestConfig" is used in creating the "Apache::Test" configuration files.
FUNCTIONS
genwarning()
my $warn = $cfg->genwarning($filename)
genwarning() returns a warning string as a comment, saying that the file was autogenerated and that it's not a good idea to modify this
file. After the warning a perl trace of calls to this this function is appended. This trace is useful for finding what code has created
the file.
genwarning() automatically recognizes the comment type based on the file extension. If the extension is not recognized, the default "#"
style is used.
Currently it support "<!-- -->", "/* ... */" and "#" styles.
genfile()
my $fh = $cfg->genfile($file);
genfile() creates a new file $file for writing and returns a file handle.
A comment with a warning and calls trace is added to the top of this file. See genwarning() for more info about this comment.
If parent directories of $file don't exist they will be automagically created.
The file $file and any created parent directories (if found empty) will be automatically removed on cleanup.
writefile()
$cfg->writefile($file, $content, [$nowarning]);
writefile() creates a new file $file with the content of $content.
A comment with a warning and calls trace is added to the top of this file unless $nowarnings is passed and set to a true value. See
genwarning() for more info about this comment.
If parent directories of $file don't exist they will be automagically created.
The file $file and any created parent directories (if found empty) will be automatically removed on cleanup.
write_perlscript()
$cfg->write_perlscript($filename, @lines);
Similar to writefile() but creates an executable Perl script with correctly set shebang line.
gendir()
$cfg->gendir($dir);
gendir() creates a new directory $dir.
If parent directories of $dir don't exist they will be automagically created.
The directory $dir and any created parent directories will be automatically removed on cleanup if found empty.
AUTHOR SEE ALSO perl(1), Apache::Test(3)perl v5.8.0 2002-09-10 Apache::TestConfig(3)