Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Comparison of 2 files in UNIX Post 302144940 by Dana Evans on Monday 12th of November 2007 03:51:29 AM
Old 11-12-2007
Comparison of 2 files in UNIX

Hi, There are two files in UNIX system with some lines are exactly the same, some lines are not.
I want to compare these two files.The 2 files (both the files have data in Column format )should be compared row wise and any difference in data for a particular row should lead to storage of data of second file in another new third file.
i.e here we are assuming second file( file 2 ) to be updated version of first file (file 1) and any difference in row wise matching would lead to storage of the updated /modified data in another third file .

Smilie
Please help me ASAPSmilieSmilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix comparison

I am very new to Unix. What are the similiarities and differences between ScoUnix and AIX5 if any? Where might i find the information? Which is better? (1 Reply)
Discussion started by: NewGuy100
1 Replies

2. Shell Programming and Scripting

comparison of 2 files

Kindly help on follows. I have 2 files. One file contains only one column of mobile numbers. And total records in a file 12 million. Second file contains 2 columns mobile numbers and balance. and total records 30 million. I want to find out balance of each data in file 1 corresponding to file 2.... (2 Replies)
Discussion started by: kamal_418
2 Replies

3. Shell Programming and Scripting

Comparison of two files (sh)

Hi, I have a problem with comparison of two files file1 20100101 20090101 20080101 20071001 20121229 file2 19990112 12 456 7 20011131 19 20100101 2 567 1 987 17890709 123 555 and, sh script needs to compare of these two files and give out to me result: 20100101 2 567 1 987 it... (5 Replies)
Discussion started by: shizik
5 Replies

4. Shell Programming and Scripting

comparison of 2 files using unix or awk

Hello, I have 2 files and I want them to be compared in a specific fashion file1: A_1200_1250 A_1251_1300 B_1301_1350 B_1351_1400 B_1401_1450 C_1451_1500 and so on... file2: 1210 1305 1260 1295 1400 1500 1450 1495 Now The script should look for "1200" from A_1200_1250 of... (8 Replies)
Discussion started by: Diya123
8 Replies

5. Shell Programming and Scripting

Comparison of two files

Hi all I have two files which I have to compare that whetehr there is soemthing common or not body, div, table, thead, tbody, tfoot, tr, th, td, p { font-family: "Liberation Sans"; font-size: x-small; } body, div, table, thead, tbody, tfoot,... (2 Replies)
Discussion started by: manigrover
2 Replies

6. Shell Programming and Scripting

File comparison in UNIX columnwise

Hi all, I want to compare two files with same number of rows and columns with records in same order. Just want to highlight the differences in the column values if any. file A 1,kolkata,19,ab 2,delhi,89,cd 3,bangalore,56,ef file2: 1,kolkata,21,ab 2,mumbai,89,gh 3,bangalore,11,kl... (9 Replies)
Discussion started by: prabhat.diwaker
9 Replies

7. Shell Programming and Scripting

Comparison between two files through UNIX script

Hi All , As I am new to unix scripting ,I need a help regarding unix scripting .I have two .txt files .One is source file and another is target file.I need a script through which I can compare those two files.I need a automated comparison report in a directory after comparing between source &... (2 Replies)
Discussion started by: STCET22
2 Replies

8. Shell Programming and Scripting

Need help regarding comparison between two files through UNIX script

Hi All , I am aware of unix command ,but not comforable in putting together in script level.I came to situation where I need to compare between two .txt files fieldwise and need a mismatch report. As I am new to unix script arena ,if anyone can help in the below scenario that will be really... (9 Replies)
Discussion started by: STCET22
9 Replies

9. Shell Programming and Scripting

UNIX file comparison

I have two files which has component name and version number separated by a space cat file1 com.acc.invm:FNS_PROD 94.0.5 com.acc.invm:FNS_TEST_DCCC_Mangment 94.1.6 com.acc.invm:FNS_APIPlat_BDMap 100.0.9 com.acc.invm:SendEmail 29.6.113 com.acc.invm:SendSms 12.23.65 cat file2 ... (8 Replies)
Discussion started by: rakeshtomar82
8 Replies

10. Shell Programming and Scripting

Comparison of files

I have the requirement I have two files cat fileA something anythg nothing everythg cat fileB everythg anythg Now i shld use fileB and compare every line at fileA and get the output as something nothing (3 Replies)
Discussion started by: Priya Amaresh
3 Replies
XkbKeyActionEntry(3)						   XKB FUNCTIONS					      XkbKeyActionEntry(3)

NAME
XkbKeyActionEntry - Returns the key action corresponding to group grp and shift level lvl from the two-dimensional table of key actions associated with the key corresponding to keycode SYNOPSIS
XkbAction XkbKeyActionEntry (XkbDescPtr xkb, KeyCode keycode, int shift, int grp); ARGUMENTS
- xkb Xkb description of interest - keycode keycode of interest - shift shift level within group - grp group index for group of interest DESCRIPTION
A key action defines the effect key presses and releases have on the internal state of the server. For example, the expected key action associated with pressing the Shift key is to set the Shift modifier. There is zero or one key action associated with each keysym bound to each key. Just as the entire list of key symbols for the keyboard mapping is held in the syms field of the client map, the entire list of key actions for the keyboard mapping is held in the acts array of the server map. The total size of acts is specified by size_acts, and the number of entries is specified by num_acts. The key_acts array, indexed by keycode, describes the actions associated with a key. The key_acts array has min_key_code unused entries at the start to allow direct indexing using a keycode. If a key_acts entry is zero, it means the key does not have any actions associated with it. If an entry is not zero, the entry represents an index into the acts field of the server map, much as the offset field of a KeySymMapRec structure is an index into the syms field of the client map. The reason the acts field is a linear list of XkbActions is to reduce the memory consumption associated with a keymap. Because Xkb allows individual keys to have multiple shift levels and a different number of groups per key, a single two-dimensional array of KeySyms would potentially be very large and sparse. Instead, Xkb provides a small two-dimensional array of XkbActions for each key. To store all of these individual arrays, Xkb concatenates each array together in the acts field of the server map. The key action structures consist only of fields of type char or unsigned char. This is done to optimize data transfer when the server sends bytes over the wire. If the fields are anything but bytes, the server has to sift through all of the actions and swap any nonbyte fields. Because they consist of nothing but bytes, it can just copy them out. XkbKeyActionEntry returns the key action corresponding to group grp and shift level lvl from the two-dimensional table of key actions asso- ciated with the key corresponding to keycode. STRUCTURES
The KeySymMapRec structure is defined as follows: #define XkbNumKbdGroups 4 #define XkbMaxKbdGroup (XkbNumKbdGroups-1) typedef struct { /* map to keysyms for a single keycode */ unsigned char kt_index[XkbNumKbdGroups]; /* key type index for each group */ unsigned char group_info; /* # of groups and out of range group handling */ unsigned char width; /* max # of shift levels for key */ unsigned short offset; /* index to keysym table in syms array */ } XkbSymMapRec, *XkbSymMapPtr; X Version 11 libX11 1.3.2 XkbKeyActionEntry(3)
All times are GMT -4. The time now is 03:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy