script to merge xml files with options


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting script to merge xml files with options
# 1  
Old 05-08-2009
script to merge xml files with options

Hi,

I have a very basic knowledge of shell scripting & would like some help with a little problem I have. I sometimes use a program calle phronix & sometimes like to compare its results which are *.xml files. Which is easy enough but a friend wants to avoid typing the path to the files.
Normally I would type
./phoronix-test-suite merge-results <saved name #1> <saved name #2> <save to> which would merge the 2x files & open the save to file in the browser.
Is there a way I could write a script which would only prompt for <save names> & <save to>?
my paths are
/home/ptrbee/.phoronix-test-suite/test-results/pc1/test-1.xml /home/ptrbee/.phoronix-test-suite/test-results/pc2/test-1.xml merged.xml

Hope this is enough info & thanks in advance

ptrbee.
# 2  
Old 05-08-2009
What's the directory name in "/home/ptrbee" ?
Is it ".phoronix-test-suite" or "phoronix-test-suite" ?

Or is "phoronix-test-suite" the name of your script and ".phoronix-test-suite" the name of directory in the absolute path to your xml files ?

tyler_durden
# 3  
Old 05-11-2009
Quote:
Originally Posted by durden_tyler
What's the directory name in "/home/ptrbee" ?
Is it ".phoronix-test-suite" or "phoronix-test-suite" ?

Or is "phoronix-test-suite" the name of your script and ".phoronix-test-suite" the name of directory in the absolute path to your xml files ?

tyler_durden
Hi Tyler, it is "./phoronix-test-suite"
The absolute path to the xml is " /home/ptrbee/.phoronix-test-suite/test-results/pc1/*.xml"

Ptrbee.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Merge XML file (to same root)

HI I am looking for a easy way to merge 2 xml files like the following file 1: will have a structure like this <Group GID="TOTO" NAME="TOTO" UNITS="1.0"> <Property NAME="Id" VALUE="TOTO"/> <Property NAME="Currency" VALUE="USD"/> <Group... (6 Replies)
Discussion started by: kykyboss
6 Replies

2. Shell Programming and Scripting

script to merge two files on an index

I have a need to merge two files on the value of an index column. input file 1 id filePath MDL_NUMBER 1 MFCD00008104.mol MFCD00008104 2 MFCD00012849.mol MFCD00012849 3 MFCD00037597.mol MFCD00037597 4 MFCD00064558.mol MFCD00064558 5 MFCD00064559.mol MFCD00064559 input file 2 ... (9 Replies)
Discussion started by: LMHmedchem
9 Replies

3. Shell Programming and Scripting

Merge different xml files in one

Dear all, I have a big number of .xml files (130GB) and I would like merge them in one. The problem is that I don't want all tags and all the xml files are the same. Is there any script that I can use? Thank you in advance for your helping! Some files are like: <doctype>TA</doctype>... (0 Replies)
Discussion started by: corfuitl
0 Replies

4. Shell Programming and Scripting

bash script to compile multiple .c files with some options

I'm trying to write a bash script and call it "compile" such that running it allows me to compile multiple files with the options "-help," "-backup," and "-clean". I've got the code for the options written, i just can't figure out how to read the input string and then translate that into option... (5 Replies)
Discussion started by: travis.batzer
5 Replies

5. Shell Programming and Scripting

A script to scan a directory for XML files,

Hi, I am fairly new to unix/linux scripting (about 1 week) and have written a script to scan a directory for xml files, if found call and oracle procedure passing in the file name and then move the file once processed to an archive area. Now everything seems to be working except when there... (3 Replies)
Discussion started by: apacheuk
3 Replies

6. Shell Programming and Scripting

merge two files via looping script

Hi all, I hope you can help me. I got a file a and a file b File a contains a b c d e f g h File b contains 1 2 3 (8 Replies)
Discussion started by: stinkefisch
8 Replies

7. Shell Programming and Scripting

script needed to merge two files and report differences

Hello, I have two txt files that look like this: db.0.0.0.0: Total number of NS records = 1 db.127.0.0.0: Total number of NS records = 1 Total number of PTR records = 1 db.172.19.0.0: Total number of NS records = 1 Total number of PTR records = 3 db.172.19.59.0: Total... (8 Replies)
Discussion started by: richsark
8 Replies

8. Shell Programming and Scripting

Perl script for extract data from xml files

Hi All, Prepare a perl script for extracting data from xml file. The xml data look like as AC StartTime="1227858839" ID="88" ETime="1227858837" DSTFlag="false" Type="2" Duration="303" /> <AS StartTime="1227858849" SigPairs="119 40 98 15 100 32 128 18 131 23 70 39 123 20 120 27 100 17 136 12... (3 Replies)
Discussion started by: allways4u21
3 Replies

9. Shell Programming and Scripting

Merge two files in windows using perl script

Hi I want to merge two or more files using perl in windows only(Just like Paste command in Unix script) . How can i do this.Is ther any single command to do this? Thanks Kunal (1 Reply)
Discussion started by: kunal_dixit
1 Replies

10. Shell Programming and Scripting

shell script to merge files

Can anybody help me out with this problem " a shell program that takes one or any number of file names as input; sorts the lines of each file in ascending order and displays the non blank lines of each sorted file and merge them as one combined sorted file. The program generates an error... (1 Reply)
Discussion started by: arya
1 Replies
Login or Register to Ask a Question