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
Actually anchal in configure.cfg file,so many filenames are there and under one filename so many sectionname's,and under each section so many parameter's.
from the input file, what's the output you expect?
if the session grouped by "----------------------"
Hi rdcwayx;
Actually i am expecting filename first from input file and search in bin folder for that filename,if found,then expecting sectionname from input file and again search that section available in that filename,if found,then iam expecting all parameter's from input file(parameter's are reside in input file is like this,may be in between two sections || may be in between sectionname and filename || section name and eof),then i am appending/inserting those parameter's in that section(destination file's section) .
Again in destination file,many probality,means taht file consist only many || one sectionname(like [charge]) and parameter's.when we found sectionname from destination file,we have to check the position where we insert/append parameter's taking from input file.again we encounter multiple section and finally eof in destination file.
---------- Post updated at 12:12 AM ---------- Previous update was at 12:02 AM ----------
Quote:
Originally Posted by frans
Should this act as you want? ---------- Post updated at 19:55 ---------- Previous update was at 19:42 ----------
If there were no spaces around the '=', you could simply do somethin like
Hi frans;
I am not expecting input from console,input is file(configure.cfg) and changes will happen in bin/filename,comes from configure.cfg.
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)
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)
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 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)
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)
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)
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)
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)
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)