As I can't make it doing the job , I am trying to find a solution step by step.
here a modified sample file : my_sample.ini for my first question
The first question is about range adress :
When I use this command :
The correct range is printed on console screen :
Now using the real sample file :
The modified command does not work, and remove all header section
Iam using sed on opensuse :
The second question will come after this one
Any help is welcome.
---------- Post updated at 18:19 ---------- Previous update was at 18:10 ----------
I want change the file when the line contains $(AA) but NOT contains $(BB), then change $(AA) to $(AA) $(BB)
eg:
$(AA) something
$(AA) $(BB) something (7 Replies)
I am new, really new to bash scripts.
I want to search an XML file for a certain string, say "1234567890"
Once found, I want to copy the entire contents from the previous instance of the string "Entity" to the next instance of "/Entity" to a txt file.
And then continue searching for the... (4 Replies)
hi people,
i'm having a hard time trying to extract a list of vars delimited by section inside a ini file ...
let's consider this ini file :
; config file
DESC = "channel synchro TGG01"
DMM_VER = DMM23
PATH_FIFO = /users/tgg00/fifo
QRT = BTS01.TGG.01.2
MODE_TRACE... (5 Replies)
I have a list of Servers in no particular order as follows:
virtualMachines="IIBSBS IIBVICDMS01 IIBVICMA01"And I am generating some output from a pre-existing script that gives me the following (this is a sample output selection).
9/17/2010 8:00:05 PM: Normal backup using VDRBACKUPS... (2 Replies)
GNU sed version 4.1.4 on Windows XP SP3 from GnuWin32
I think that I've come across a seemingly simple text file change problem on a INI formatted file that I can't do with SED without side effects edge cases biting me. I've tried to think of various ways of doing this elegantly and quickly... (5 Replies)
Hi,
heres my problem:
echo "aaaa(aaaa(aaa" | sed 's/a.*(//g'
gives aaa
but it should give aaaa(aaa
.*( should find any string to the appearance of (, but it finds any string to the last appearance, any idea why, and how to do this?
and what if the string ist... (2 Replies)
hello all,
I have a file like this:
section 1
blah1
blah2
section 2
blah1
blah2
section 3
blah1
blah2
and I want to use sed to duplicate section 2, like this:
section 1
blah1
blah2
section 2
blah1
blah2
section 2
blah1 (2 Replies)
I need to get a section of a file based on 2 params. I want the part of the file between param 1 & 2. I have tried a bunch of ways and just can't seem to get it right. Can someone please help me out.....its much appreciated. Here is what I have found that looks like what I want....but doesn't... (12 Replies)
Hello
I have several files where a string similar to this appears:
/home/workload/bin/ProcDly/scrpts/T54.sh > $LOG
I need to change it to something like this:
$VARIABLE > $LOG
However, due to the configuration of the rest of the files, I should only find this string by the... (4 Replies)
Hi!
I've the following script code with an input parameter:
sed 's/oldstring/$1/g' myfile > newfile
(I launch it with comman line: $ MyShell newstring)
Problem: the substituion doesn't work (oldstring becomes $1, instead of newstring). How could I solve this situation?
Thanks, ... (2 Replies)