Sponsored Content
Operating Systems Linux Comapring columns in 2 files and printing the values that differ. Post 302959374 by Syeda Sumayya on Monday 2nd of November 2015 01:14:56 AM
Old 11-02-2015
No, not really, this isn't exactly what I wanted.
There was a little mistake in the output I had shown, sorry! I've corrected it now.

I do want to compare $1 of file-1 with both columns of file-2, but in the output I want to print $1 first and then the value (same or different) that is next to it in file-2.

Last edited by Syeda Sumayya; 11-02-2015 at 02:25 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Columns comparision of two large size files and printing the difference

Hi Experts, My requirement is to compare the second field/column in two files, if the second column is same in both the files then compare the first field. If the first is not matching then print the first and second fields of both the files. first file (a .txt) < 1210018971FF0000,... (6 Replies)
Discussion started by: krao
6 Replies

2. UNIX for Dummies Questions & Answers

Comparing the 2nd column in two different files and printing corresponding 9th columns in new file

Dear Gurus, I am very new to UNIX. I appreciate your help to manage my files. I have 16 files with equal number of columns in it. Each file has 9 columns separated by space. I need to compare the values in the second column of first file and obtain the corresponding value in the 9th column... (12 Replies)
Discussion started by: Unilearn
12 Replies

3. UNIX for Dummies Questions & Answers

Comparing two text files by a column and printing values that do not match

I have two text files where the first three columns are exactly the same. I want to compare the fourth column of the text files and if the values are different, print that row into a new output file. How do I go about doing that? File 1: 100 rs3794811 0.01 0.3434 100 rs8066551 0.01... (8 Replies)
Discussion started by: evelibertine
8 Replies

4. Shell Programming and Scripting

Sum up values of columns in 4 files using shell script

I am new to shell script.I have records like below in 4 different files which have about 10000 records each, all records unique and sorted based on column 2. 1 2 3 4 5 6 --------------------------- SR|1010478|000044590|1|0|0| SR|1014759|000105790|1|0|0| SR|1016609|000108901|1|0|0|... (2 Replies)
Discussion started by: reach.sree@gmai
2 Replies

5. UNIX for Dummies Questions & Answers

Comparing two test files and printing out the values that do not match

Hi, I have two text files with matching first columns. Some of the values in the second column do not match. I want to write a script to print out the rows (only the first column) where the values in the second column do not match. Example: Input 1 A 1 B 2 C 3 D 4 Input 2 A 2 B 2... (6 Replies)
Discussion started by: evelibertine
6 Replies

6. UNIX for Dummies Questions & Answers

Printing all the values in the middle of two columns

Hi, I have a tab delimited text file with three columns: Input: 1 25734 25737 1 32719 32724 1 59339 59342 1 59512 59513 1 621740 621745 For each row of the text file I want to print out all the values between the second and third columns, including them. The... (3 Replies)
Discussion started by: evelibertine
3 Replies

7. Shell Programming and Scripting

Common values in 2 columns in 2 files

Hello, Suppose I have these 2 tab delimited files, where the second column in first file contains matching values from first column of the second file, I would like to get an output like this: File A 1 A 2 B 3 C File B A Apple C Cinnabon B Banana I would like... (1 Reply)
Discussion started by: Mohamed EL Hadi
1 Replies

8. Shell Programming and Scripting

Comparing same column from two files, printing whole row with matching values

First I'd like to apologize if I opened a thread which is already open somewhere. I did a bit of searching but could quite find what I was looking for, so I will try to explaing what I need. I'm writing a script on our server, got to a point where I have two files with results. Example: File1... (6 Replies)
Discussion started by: mitabrev83
6 Replies

9. Shell Programming and Scripting

Comparing two columns in two files and printing a third based on a match

Hello all, First post here. I did not notice a previous post to help me down the right path. I am looking to compare a column in a CSV file against another file (which is not a column match one for one) but more or less when a match is made, I would like to append a third column that contains a... (17 Replies)
Discussion started by: dis0wned
17 Replies

10. Shell Programming and Scripting

Match value in two files and replace values in selected columns

The purpose is to check if values for column 3 and 4 in file1 match with column 1 in file2. If any value match do: 1) Replace values in file2 for column 2 and 3 using the information of file1 columns 5 and 6 2) Replace string ($1,1,5) and string ($1,6,5) in file2 with values of columns 7... (8 Replies)
Discussion started by: jiam912
8 Replies
RP(4)							   BSD Kernel Interfaces Manual 						     RP(4)

NAME
rp -- driver for Comtrol RocketPort Intelligent Serial Port Cards SYNOPSIS
device rp For ISA cards, you must specify the port address in /boot/device.hints: hint.rp.0.at="isa" hint.rp.0.port="0x100" DESCRIPTION
This driver provides a kernel device driver for the RocketPort and RocketPort RA serial boards. These boards provide 8, 16, or 32 high-speed serial ports while requiring only 68 bytes of I/O space for all 8, 16, or 32 ports, and do not require an interrupt channel. This driver supports up to four RocketPort or RocketPort RA boards in one machine simultaneously. If you are using four 32 port RocketPort boards, you can put as many as 128 intelligent serial ports on your system. The rp driver supports the following speeds: 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 7200, 14400, 57600, 76800, 115200, and 230400. (You must use termios(4), rather than the old style ioctl interface to use non-traditional speeds.) An open on the rp driver will block until carrier is present, unless O_NONBLOCK or CLOCAL is set. HARDWARE CONFIGURATION
The first RocketPort or RocketPort RA card requires a 68-byte contiguous block of I/O addresses, starting at one of the following: 0x100h, 0x140h, 0x180h, 0x200h, 0x240h, 0x280h, 0x300h, 0x340h, 0x380h. The second, third, and fourth RocketPort cards require only a 64-byte con- tiguous block of I/O addresses, starting at one of the above address ranges. The I/O address range used by any of the RocketPort cards must not conflict with any other cards in the system, including other RocketPort cards. The starting range of the I/O ports used by each card must match with the I/O address specified in /boot/device.hints. Since the first RocketPort uses 68 I/O addresses, if the first card is set to use an I/O block starting at 0x100, it will occupy the I/O ports between 0x100 and 0x143. This means that the second, third, or fourth RocketPort board may not use the block of addresses starting at 0x140, since the first three I/O addresses of that range are used by the first board. This is an important point to keep in mind. If you have two ISA cards, one installed at 0x100 and the second installed at 0x180, then you should add the following to /boot/device.hints: hint.rp.0.at="isa" hint.rp.0.port="0x100" hint.rp.1.at="isa" hint.rp.1.port="0x180" The configuration of the RocketPort cards is done via the set of 8 DIP switches, labeled SW1 on the RocketPort card: +-------------------------------+ | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | +-------+-------+---------------+ | Unused| Card | I/O Port Block| +-------------------------------+ DIP switches 7 and 8 are unused, and must be left on. DIP switches 6 and 5 identify the card number of each RocketPort card. The first card installed in the system must have its DIP switches set as card number one; the second card installed in the system must have its DIP switches set as card number two; and so on. As shipped from the factory, DIP switches 6 and 5 are both on by default, indicating that this is the first card installed on the system: DIP Switches 6 5 =================== On On First Card On Off Second Card Off On Third Card Off Off Fourth Card DIP switches 4, 3, 2, and 1 indicate the I/O address range used by the first RocketPort card. If there are more than one RocketPort cards installed in a system, the second, third and fourth RocketPort cards must also be set to the I/O address range used by the first RocketPort card; all cards must have these DIP switches set identically for proper operation. As shipped from the factory, DIP switch 4 is on, and switches 3, 2, and 1 are off by default, indicating an I/O address range used by the first card which starts at 0x180 and extends to 0x1C3. DIP Switches I/O Address Range 4 3 2 1 Used by the First Card ===================================== On Off On Off 100-143 On Off Off On 140-183 On Off Off Off 180-1C3 Off On On Off 200-243 Off On Off On 240-283 Off On Off Off 280-2C3 Off Off On Off 300-343 Off Off Off On 340-383 Off Off Off Off 380-3C3 FILES
/dev/ttyR[0-4][0-9a-f] AUTHORS
Theodore Ts'o <tytso@mit.edu> This driver was written under contract for Comtrol Corporation. For dealer, distributor and other information regarding Comtrol RocketPort, contact Comtrol Corporation at (800) 926-6876 or send email to <info@comtrol.com>. To report bugs for this driver, please send email to <bug-bsdi-rocketport@comtrol.com>. BUGS
If incoming software flow control is enabled on a 486 or Pentium machine, and the flow control is very heavily exercised, on rare occasions a character will get dropped. This problem does not occur on a 386, and it is not currently known whether the bug is in the rp driver or in the BSD/OS tty layer. BSD
November 15, 1995 BSD
All times are GMT -4. The time now is 07:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy