08-13-2010
Compare two columns in two files and print the difference
one file
. . importing table employee 119
. . importing table jobs 1
2nd file
. . importing table employee 120
. . importing table jobs 1
and would like compare 3rd colums(which is employee) in both files print only not matched
employee 119
employee 120
Thanks
Last edited by fpmurphy; 08-14-2010 at 01:55 AM..
Reason: fix up title
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
suppose one file
P1168S
P2150L
P85L
Q597R
R1097C
Another file
P2150L
P85L
Q597R
R1097C
R1379C
R1587K
Then output shud be
R1379C
R1587K
thanks (5 Replies)
Discussion started by: cdfd123
5 Replies
2. Shell Programming and Scripting
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
I have two files like this:
#FILE 1
ABCD 4322 26485
JMTJ 5311 97248
XMPJ 4321 58978
#FILE 2
ABCD 4321 26485
JMTJ 5311 97248
XMPJ 4321 68978
What to do: Compare the two files and find those lines that doesn't match. And have a new file like this:
#FILE 3
"from file 1"
ABCD 4322 26485... (11 Replies)
Discussion started by: kingpeejay
11 Replies
4. Shell Programming and Scripting
I have learned file comparison from my previous post here. Then, it is comparing the whole line. Now, i have a new problem.
I have two files with 3 columns separated with a "|". What i want to do is to compare the second and third column of file 1, and the second and third column of file 2. And... (4 Replies)
Discussion started by: kingpeejay
4 Replies
5. Shell Programming and Scripting
Hi,
I have two tab separated files;
file1:
S.No ddi fi cu o/l t+ t-
1 0.5 0.6 o 0.1 0.2
2 0.2 0.3 l 0.3 0.4
3 0.5 0.8 l 0.1 0.6
... (5 Replies)
Discussion started by: vasanth.vadalur
5 Replies
6. Shell Programming and Scripting
hi! i researched about comparing two columns here and got an answer. but after examining my two files, i found out that the first columns of the two files are not unique with each other. all i want to compare is the 2nd and 3rd column.
FILE 1:
ABS 456 315
EBS 923 163
JYQ3 654 237
FILE 2:... (1 Reply)
Discussion started by: engr.jay
1 Replies
7. Shell Programming and Scripting
File 1 has 16 columns so does File 2
I want to remove all records from File 2 that column 1 and column 16 match between file 1 and file 2
delimter of files is ~ (10 Replies)
Discussion started by: sigh2010
10 Replies
8. Shell Programming and Scripting
Hello. I have two files. FILE1 was extracted from FILE2 and modified thanks to help from this post. Now I need to replace the extracted, modified lines into the original file (FILE2) to produce the FILE3.
FILE1
1466 55.27433 14.72050 -2.52E+03 3.00E-01 1.05E+04 2.57E+04
1467 55.27433... (1 Reply)
Discussion started by: jm4smtddd
1 Replies
9. Shell Programming and Scripting
Hi,
I want to compare two columns from file1 with another two column of file2 and print matched and unmatched column like this
File1
1 rs1 abc
3 rs4 xyz
1 rs3 stu
File2
1 kkk rs1 AA 10
1 aaa rs2 DD 20
1 ccc ... (2 Replies)
Discussion started by: justinjj
2 Replies
10. Shell Programming and Scripting
Hello,
I have two text files, each with a single column,
file 1:
124152970
123899868
123476854
54258288
123117283
file 2:
124152970
123899868
54258288
123117283
122108330 (5 Replies)
Discussion started by: LMHmedchem
5 Replies
LEARN ABOUT DEBIAN
tangram::type::array::frommany
Tangram::Type::Array::FromMany(3pm) User Contributed Perl Documentation Tangram::Type::Array::FromMany(3pm)
NAME
Tangram::Type::Array::FromMany - map Perl arrays using a link table
SYNOPSIS
use Tangram;
# or
use Tangram::Core;
use Tangram::Type::Array::FromMany;
$schema = Tangram::Schema->new(
classes => { Company => { fields => {
array =>
{
# long form
employee =>
{
class => 'Person',
table => 'Company_employees',
coll => 'company',
item => 'employee',
slot => 'slot'
},
# short form
assets => 'Asset',
}
DESCRIPTION
Maps references to a Perl array. The persistent fields are grouped in a hash under the "array" key in the field hash.
The array may contain only objects of persistent classes. These classes must have a common persistent base class.
Tangram uses a link table to save the state of the collection. The table has three columns, which contain
* the id of the container objects
* the id of the elements
* the position of the element in the array
The field names are passed in a hash that associates a field name with a field descriptor. The field descriptor may be either a hash or a
string. The hash uses the following fields:
* class
* aggreg
* table
* coll
* item
* slot
* deep_update
Mandatory field "class" specifies the class of the elements.
Optional field "aggreg" specifies that the elements of the collection must be removed (erased) from persistent storage along with the con-
taining object. The default is not to aggregate.
Optional field "table" sets the name of the link table. This defaults to 'C_F', where C is the class of the containing object and F is the
field name.
Optional field "coll" sets the name the column containing the ids of the containing objects. This defaults to 'coll'.
Optional field "item" sets the name the column containing the ids of the elements. This defaults to 'item'.
Optional field "slot" sets the name the column containing the position of the elements. This defaults to 'slot'.
Optional field "deep_update" specificies that all elements have to be updated automatically when "update" is called on the collection
object. Automatic update ensures consisitency between the Perl representation and the DBMS state, but degrades update performance so use it
with caution. The default is not to do automatic updates.
If the descriptor is a string, it is interpreted as the name of the element's class. This is equivalent to specifying only the "class"
field in the hash variant.
perl v5.8.8 2006-03-29 Tangram::Type::Array::FromMany(3pm)