I have two xml files with the name source.xml and tobe_replaced.xml.
Sample data:
source.xml contains:
tobe_replaced.xml contains:
i want to search description and take the value after =" ie prod1,prod2,abc/partialinfo and also get the product_info values ie some/info,abc/partialinfo/edited .
this is done as follows or similar to this:
In tobe_replaced.xml, search the value of $2 and replace product_info with value of $4 for all the lines from source.xml to tobe_replaced.xml.
desired output in tobe_replaced.xml is:
How do i do this while reading all the lines from both the files?
Last edited by dragon.1431; 03-02-2011 at 06:07 PM..
Reason: corrected text info
I am trying to use awk to find all the $2 values in file2 which is ~30MB and tab-delimited, that are between $2 and $3 in file1 which is ~2GB and tab-delimited.
I have just found out that I need to use $1 and $2 and $3 from file1 and $1 and $2of file2 must match $1 of file1 and be in the range... (6 Replies)
I have file 1 & file 2 with content mentioned below. I want to get the output as shown in file3.
Requirement:
check the content of column 1 & column 2, if value of column 1 in file1 matches with first column of file2 then remaining columns(2&3) of file2 should get replaced, also if value of... (4 Replies)
Hello to all,
I hope somebody could help me with this:
I have this File1 (real has 5 million of lines):
Number Category
--------------- --------------------------------------
8734060355 3
8734060356 ... (6 Replies)
I have very limited coding skills but I'm wondering if someone could help me with this. There are many threads about matching strings in two files, but I have no idea how to add a column from one file to another based on a matching string.
I'm looking to match column1 in file1 to the number... (3 Replies)
I have 2 files:
file1.txt:
1|15|XXXXXX||9630716||0096000||30/04/2012|E|O|X||||20120525135617-30.04.2012|PAT66OLM|STA||||00001|STA_0096000_YYYPPPXTMEX00_20120525135617_02_P.pdf|... (2 Replies)
Hi All,
I have file1 line below:
$myName$|xxx
Now I need to read the file1 and find for $myName$ in file2 and replace with xxx
file1:
$myName$|xxx
file2:
My name is $myName$
expected output in file2 after executing the script is below:
my name is xxx
Thanks, (8 Replies)
file1: has all words to be searched.
100007
200999
299997
File2: has all file names to be searched.
C:\search1.txt
C:\search2.txt
C:\search3.txt
C:\search4.txt
Outfile: should have all found lines.
Logic: Read each word in file1 and search each file in the list of File2; if the... (8 Replies)
Hi people,
I have 2 files, one with a list of non consecutive ranges (File1.txt), where each range begins with the value in column 1
and finishes with the value in column 2 in the same line, as can be seen above.
215312581156279 215312581166279
215312582342558 215312582357758... (4 Replies)
Hi All,
as you can see I'm pretty new to this board. :D
I'm struggling around with small script to search a few fields in another file.
Basically I have file1 looking like this:
15:38:28 sz:10001 pr:14.16
15:38:28 sz:10002 pr:18.41
15:38:29 sz:10003 pr:19.28
15:38:30 sz:10004... (1 Reply)