Sponsored Content
Top Forums UNIX for Advanced & Expert Users Shell Script to compare xml files and print output to a file Post 302508521 by fpmurphy on Monday 28th of March 2011 11:23:29 AM
Old 03-28-2011
There are two excellent opensource tools which already do this: XMLdiff and diffxml.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk to compare lines of two files and print output on screen

hey guys, I have two files both with two columns, I have already created an awk code to ignore certain lines (e.g lines that start with 963) as they wou ld begin with a certain string, however, the rest I have added together and calculated the average. At the moment the code also displays... (3 Replies)
Discussion started by: chlfc
3 Replies

2. Shell Programming and Scripting

compare columns from seven files and print the output

Hi guys, I need some help to come out with a solution . I have seven such files but I am showing only three for convenience. filea a5 20 a8 16 fileb a3 42 a7 14 filec a5 23 a3 07 The output file shoud contain the data in table form showing first field of... (7 Replies)
Discussion started by: smriti_shridhar
7 Replies

3. Shell Programming and Scripting

awk to compare flat files and print output to another file

Hello, I am strugling from quite a some time to compare flat files with over 1 million records could anyone please help me. I want to compare two pipe delimited flat files, file1 with file2 and output the unmatched rows from file2 in file3 Sample File1: ... (9 Replies)
Discussion started by: suhaeb
9 Replies

4. Shell Programming and Scripting

compare two files and search keyword and print output

You have two files to compare by searching keyword from one file into another file File A 23 >pp_ANSWER 24 >aa hello 25 >jau head wear 66 >jss oops 872 >aqq olps ploww oww sss 722 >GG_KILLER ..... large files File B Beta done KILLER John Mayor calix meyers ... (5 Replies)
Discussion started by: cdfd123
5 Replies

5. Shell Programming and Scripting

Comparing 2 xml files and print the differences only in output

Hi....I'm having 2 xml files, one is having some special characters and another is a clean xml file does not have any special characters. Now I need one audit kind of file which will show me only from which line the special characters have been removed and the special characters. Can you please... (1 Reply)
Discussion started by: Krishanu Saha
1 Replies

6. Shell Programming and Scripting

Compare columns of multiple files and print those unique string from File1 in an output file.

Hi, I have multiple files that each contain one column of strings: File1: 123abc 456def 789ghi File2: 123abc 456def 891jkl File3: 234mno 123abc 456def In total I have 25 of these type of file. (5 Replies)
Discussion started by: owwow14
5 Replies

7. UNIX for Dummies Questions & Answers

Reading XML file and print the values in the text file using Linux shell script

hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file <sequence> <Filename>aldorzum.doc</Filename> <DivisionCode>US</DivisionCode> <ContentType>Template</ContentType> <ProductCode>VIMZIM</ProductCode> </sequence>... (1 Reply)
Discussion started by: sravanreddy
1 Replies

8. Shell Programming and Scripting

Shell script (sh file) logic to compare contents of one file with another file and output to file

Shell script logic Hi I have 2 input files like with file 1 content as (file1) "BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt File 2 contents as fle(2) "BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt I want to get... (22 Replies)
Discussion started by: pottic
22 Replies

9. UNIX for Beginners Questions & Answers

Compare two files and print output

Hi All, i am trying to compare two files in Centos 6. F1: /tmp/d21 NAME="xvda" TYPE="disk" SIZE="40G" OWNER="root" GROUP="disk" MODE="brw-rw----" MOUNTPOINT="" NAME="xvda1" TYPE="part" SIZE="500M" OWNER="root" GROUP="disk" MODE="brw-rw----" MOUNTPOINT="/boot" NAME="xvda2" TYPE="part"... (2 Replies)
Discussion started by: balu1234
2 Replies
xmltest(1)						      General Commands Manual							xmltest(1)

NAME
xmltest - Test script to send CIM-XML (via wbemcat) to CIMOM and compare to known results SYNOPSIS
xmltest [FILE] DESCRIPTION
xmltest is a script that is used to send a raw CIM-XML test file to the sfcb CIMOM (using wbemcat) and then compares the returned CIM-XML results against a previously determined 'OK' result file to check whether the returned results match the expected results. If there does not yet exist an 'OK' corresponding to the XML file then xmltest will save the returned results as the new OK file for later use. If the returned CIM-XML results don't match the existing 'OK' file a new 'result' file will be generated containing the erroneous results. If no FILE is specified xmltest will use all files with a .xml extension in the current directory path. EXAMPLE
If there is no 'OK' file to compare returned CIM-XML results against xmltest will generate one. # xmltest test/getclass.Linux_OperatingSystem.xml Running test test/getclass.Linux_OperatingSystem.xml ... OK Saving response as test/getclass.Linux_OperatingSystem.OK If the returned CIM-XML results match the existing 'OK' file xmltest will signal that the test passed. # xmltest test/getclass.Linux_OperatingSystem.xml Running test test/getclass.Linux_OperatingSystem.xml ... Passed If the returned CIM-XML results don't match the existing 'OK' file xmltest will signal that the tes failed and generate a 'result' file containing the erroneous results. # xmltest test/getclass.Linux_OperatingSystem.xml Running test test/getclass.Linux_OperatingSystem.xml ... FAILED Check test/getclass.Linux_OperatingSystem.result for errors PREREQUISITES
Requires wbemcat on search path. AUTHOR
Dr. Gareth S. Bestor <bestor@us.ibm.com> CONTRIBUTORS
Adrian Schuur <schuur@de.ibm.com> BUGS
Does not adequately deal with additional http headers/footers caused by chunking responses, which will result in false failures when com- paring results to existing "x.OK" files. The SBLIM project maintains a mailing list to which you should direct all questions regarding sfcb, sfcc, wbemcli, or any of the SBLIM providers. To subscribe to this mailing list visit http://lists.sourceforge.net/lists/listinfo/sblim-issues The SBLIM Project Bug tracking page can be found at http://sourceforge.net/tracker/?group_id=128809&atid=712784 COPYRIGHT
(C) Copyright IBM Corp. 2004, 2005 AVAILABILITY
The Small-Footprint CIM Broker (sfcb) is a part of the SBLIM project. The most recent version is available on the web at http://sblim.sourceforge.net/ SEE ALSO
wbemcat(1) xmltest Version 1.3.16 August 2005 xmltest(1)
All times are GMT -4. The time now is 06:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy