HI guys,
I have created a script to read 1 column in a csv file and then place it in text file.
However, when i checked out the text file, it is not in a column format...
Example:
CSV file contains
name,age
aa,11
bb,22
cc,33
After using awk to get first column
TXT file... (1 Reply)
Hi,
I was trying some split command to pull out values like "uid=abc,ou=INTERNAL,ou=PEOPLE" into a csv file. However because of erratic nature of occurrance of rows made me stopped. Could someone help me in this? and if someone has a one liner for this?
The text file contain pattern like this... (14 Replies)
HI All,
I have a text file memory.txt which has following values.
Average: 822387 7346605 89.93 288845 4176593 2044589 51883 2.47 7600
i want to convert this file in csv format and i am using following command to do it.
sed s/_/\./g <... (3 Replies)
Hi,
I need to parse text, xml files to get the statistic numbers and prepare summary csv file.
What is the best way to parse these file and prepare csv file.
Any idea you have , please?
Regards, (2 Replies)
Hi - I am looking to convert the following text to csv. The columns may not always have data in them and they may have varying spaces but I still need to have a comma there anyway:
Sample Data:
~~~~~~~
Name Email Location Phone
Tom... (4 Replies)
Hi!
I need to realize this task.
In folder i have such files:
name1.txt
name1.pdf
name2.txt
name2.pdf
etc...
I want to scan this folder, match files with same name (name1.txt with name1.pdf, name2.txt with name2.pdf) and create files name1.xml and name2.xml, based on it. i.e:
i want... (13 Replies)
hi..
I have a text file which looks likes this
2258
4569
1239
258
473
i need to convert it into comma seperated format
eg:2258,4569,1239,258,437
pls help (8 Replies)
Hi people. I've finally converted to linux, and I'm starting to explore the amazing capabilities of the terminal. At the moment in trying to learn how to extract text using the "grep" and "sed" command. I decided to learn by trying to figure out how to solve a practical problem. I have a schedule... (4 Replies)
I have a table as following
Archive id Line Author Time Text
1fjj34 3 75jk5l 03:20 this is an evidence regarding ...
1fjj34 4 gjhhtrd 03:21 we have seen those documents before
1fjj34 10 645jmdvvb 04:00 Will you consider such an offer?... (0 Replies)
Hi,
I have a xml script, I converted it to .txt with values comma seperated using awk function. But I want the output values should be inside double quotes
My xml script (Workorders.xml) is shown like below:
<?xml version="1.0" encoding="utf-8" ?>
<scbm-extract version="3.3">... (8 Replies)
Discussion started by: Viswanatheee55
8 Replies
LEARN ABOUT DEBIAN
stag-diff
STAG-DIFF(1p) User Contributed Perl Documentation STAG-DIFF(1p)NAME
stag-diff - finds the difference between two stag files
SYNOPSIS
stag-diff -ignore foo-id -ignore bar-id file1.xml file2.xml
DESCRIPTION
Compares two data trees and reports whether they match. If they do not match, the mismatch is reported.
ARGUMENTS
-help|h
shows this document
-ignore|i ELEMENT
these nodes are ignored for the purposes of comparison. Note that attributes are treated as elements, prefixed by the containing
element id. For example, if you have
<foo ID="wibble">
And you wish to ignore the ID attribute, then you would use the switch
-ignore foo-ID
You can specify multiple elements to ignore like this
-i foo -i bar -i baz
You can also specify paths
-i foo/bar/bar-id
-parser|p FORMAT
which parser to use. The default is XML. This can also be autodetected by the file suffix. Other alternatives are sxpr and itext. See
Data::Stag for details.
-report|r ELEMENT
report mismatches as they occur on each element of type ELEMENT
multiple elements can be specified
-verbose|v
used in conjunction with the -report switch
shows the tree of the mismatching element
OUTPUT
If a mismatch is reported, a report is generated displaying the subpart of the tree that could not be matched. This will look like this:
REASON: no_matching_node: annotation
no_matching_node: feature_set
no_matching_node: feature_span
no_matching_node: evidence
no_matching_node: evidence-id
data_mismatch(:15077290 ne :15077291): evidence-id AND evidence-id
Due to the nature of tree matching, it can be difficult to specify exactly how trees do not match. To investigate this, you may need to use
the -r and -v options. For the above output, I would recommend using
stag-diff -r feature_span -v
ALGORITHM
Both trees are recursively traversed... see the actual code for how this works
The order of elements is not important; eg
<foo>
<bar>
<baz>1</baz>
</bar>
<bar>
<baz>2</baz>
</bar>
</foo>
matches
<foo>
<bar>
<baz>2</baz>
</bar>
<bar>
<baz>1</baz>
</bar>
</foo>
The recursive nature of this algorithm means that certain tree comparisons will explode wrt time and memory. I think this will only happen
with very deep trees where nodes high up in the tree can only be differentiated by nodes low down in the tree.
Both trees are loaded into memory to begin with, so it may thrash with very large documents
AUTHOR
Chris Mungall cjm at fruitfly dot org
SEE ALSO
Data::Stag
perl v5.10.0 2008-12-23 STAG-DIFF(1p)