Could someone please let me know shell script or awk solution to compare two columns in two files? Here is the sample -
file1.txt
file2.txt
In above files, I would like to compare files 1 and 2 in file1.txt with fields 2 and 7 in file2.txt. Only if both fields matches, I would like to print/save file2.txt line into new file. So, in above comparison I would like to print out following -
file3.txt
Could someone please help me with script for this?
My Friends,
Need your help to find the difference between few columns from two comma delimited files. For example, File1 and File2 has 22 columns, and I want to find the difference in first 12 columns.
I have list of file names in MyListOfFiles2Compare.txt. Data is separated with commas.... (5 Replies)
Hi all,
I would like to compare a column in one file to a column in another file and when there is a match it prints the first column and the corresponding second column. Example
File1
ABA
ABC
ABE
ABF
File 2
ABA 123
ABB 124
ABD 125
ABC 126
So what I would like printed to a file... (0 Replies)
Hi
I have file 1 like this
and file 2 like this
I need to compare column 3 of both files and delete lines in file1 with same column 3 values in two files. So the output is
I tried with perl but didnt work. A perl code will be good as I am learning the language, but any other code would... (1 Reply)
Hi,
I want to compare the columns of two files excluding column 2 from both the files. I tried this awk command.
awk -F":" 'NR==FNR{++a;next} !(a)' file1.txt file2.txt
.
Example: File1.txt
123:09-15-2011:abc:123456
123:09-15-2011:abc:234567
123:09-15-2011:abc:345678
... (5 Replies)
Hi,
I need to compare multiple columns from 2 files.
I can, for example, have these 2 files:
file1:
col1, col2, col3,col4
a,1,4,7
b,2,5,8
c,3,6,9file2:
col1, col2, col3,col4
a,2,3,2
b,5,7,5
c,1,9,8As a result, I need for example the difference between the columns 2 and 4:
col2,... (3 Replies)
Hi all, I'm pretty much a newbie to UNIX. I would appreciate any help with UNIX coding on comparing two large csv files (greater than 10 GB in size), and output a file with matching columns.
I want to compare file1 and file2 by 'id' and 'chain' columns, then extract exact matching rows'... (5 Replies)
Hi,
Below is my requirement
file1
id|cnt
1|1
2|2
3|3
file2
id_1|cnt_1
1|1
2|1
3|1
I want to compare cnt and cnt_1 columns, if they are differ then give the details
Am using below awk command, but the output is not as expected. (2 Replies)
Hi All,
I have a.dat file with content
1,338,30253395122015103,2015103,UB0085000,STMT151117055527002,,,
1,338,30253395122015103,2015103,UB0085000,STMT151117055527001,,,
and b.dat having content
1,STMT151117055527001,a1.txt,b1.txt,c1.txt
1,STMT151117055527002,a2.txt,b2.txt,c2.txt
... (13 Replies)
Discussion started by: PRAMOD 96
13 Replies
LEARN ABOUT OPENSOLARIS
mlib_videodct8x8_s16_s16_na
mlib_VideoDCT8x8_S16_S16_B10_NA(3MLIB) mediaLib Library Functions mlib_VideoDCT8x8_S16_S16_B10_NA(3MLIB)NAME
mlib_VideoDCT8x8_S16_S16_B10_NA, mlib_VideoDCT8x8_S16_S16_NA - forward Discrete Cosine Transform (DCT)
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include <mlib.h>
mlib_status mlib_VideoDCT8x8_S16_S16_B10_NA(
mlib_s16 coeffs[64], const mlib_s16 block[64]);
mlib_status mlib_VideoDCT8x8_S16_S16_NA(
mlib_s16 coeffs[64], const mlib_s16 block[64]);
DESCRIPTION
The mlib_VideoDCT8x8_S16_S16_B10_NA() function computes the forward DCT for the destination DCT coefficients of data type mlib_s16 and a
source block of data type mlib_s16. The input to the DCT routine is the difference between the current block and the reference block. The
difference pixel can occupy nine bits and is represented as a 16-bit datum.
This function requires no special address alignment.
Since mediaLib 2.5, mlib_VideoDCT8x8_S16_S16_NA() has been renamed to mlib_VideoDCT8x8_S16_S16_B10_NA(). Now mlib_VideoDCT8x8_S16_S16_NA()
is an alias of mlib_VideoDCT8x8_S16_S16_B10_NA().
PARAMETERS
The function takes the following arguments:
coeffs Pointer to the destination DCT coefficients.
block Pointer to an 8x8 motion-compensated block that is the difference between the reference block and the current block.
RETURN VALUES
The function returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO mlib_VideoDCT2x2_S16_S16(3MLIB), mlib_VideoDCT4x4_S16_S16(3MLIB), mlib_VideoDCT8x8_S16_S16_B10(3MLIB), mlib_VideoDCT8x8_S16_S16_B12(3MLIB),
mlib_VideoDCT8x8_S16_U8(3MLIB), mlib_VideoDCT8x8_S16_U8_NA(3MLIB), mlib_VideoDCT16x16_S16_S16(3MLIB),
mlib_VideoDCT16x16_S16_S16_B10(3MLIB), attributes(5)SunOS 5.11 2 Mar 2007 mlib_VideoDCT8x8_S16_S16_B10_NA(3MLIB)