Sponsored Content
Top Forums UNIX for Dummies Questions & Answers find common lines using just one column to compare and result with all columns Post 302303296 by vgersh99 on Thursday 2nd of April 2009 10:14:42 AM
Old 04-02-2009
Hmm.... I don't quite understand the logic how you determine the 'intersection'...
What does that mean:
Quote:
The result i´m looking for is intersection with A B C D F

so the answer here will be

7 8 9 2 3

So how do we do a intersection using to compare just the column 1 .
Can you try explaining again, please.

Last edited by vgersh99; 04-02-2009 at 11:23 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

To find all common lines from 'n' no. of files

Hi, I have one situation. I have some 6-7 no. of files in one directory & I have to extract all the lines which exist in all these files. means I need to extract all common lines from all these files & put them in a separate file. Please help. I know it could be done with the help of... (11 Replies)
Discussion started by: The Observer
11 Replies

2. Ubuntu

How to compare two columns and fetch the common data with additional column

Dear All, I am new to this forum and please ignore my little knowledge :p I have two types of data (a subset is given below) data version 1: 439798 2 1 451209 1 2 508696 2 1 555760 2 1 582757 1 2 582889 1 2 691827... (2 Replies)
Discussion started by: evoll
2 Replies

3. Shell Programming and Scripting

Compare a common field in two files and append a column from File 1 in File2

Hi Friends, I am new to Shell Scripting and need your help in the below situation. - I have two files (File 1 and File 2) and the contents of the files are mentioned below. - "Application handle" is the common field in both the files. (NOTE :- PLEASE REFER TO THE ATTACHMENT "Compare files... (2 Replies)
Discussion started by: Santoshbn
2 Replies

4. Shell Programming and Scripting

Compare two sample files and find common

Hi I have two sample files attached here one file contain entries in one column and second file contains entries in many columns I have to match entries of first file with entries in secon d file form secon column onwards and if matches write "match" in front of it. I tried several... (11 Replies)
Discussion started by: manigrover
11 Replies

5. Shell Programming and Scripting

Seperated by columns, merge in a file, sort them on common column

Hi All, I have 4 files in below format. I took them as an example. File 1: Cut from position 1-4 then 6-7 then 8-14 then rest left and make them as columns in one new file. Inserting character H to the initial of all line like HCTOT. CTOT 456787897 Low fever CTOR 556712345 High fever... (2 Replies)
Discussion started by: Mannu2525
2 Replies

6. Shell Programming and Scripting

Compare two columns and replacing it with value from third column!!

Hi, I am new to Unix and I am finding it hard to fix a particular logic. The context is as below. File 1 : This contains of 5 fields : Type | Bank Code | Account | Name | Date/Time 60|ABC123|TX123456|XXXX|YYYYMMDDHH:MM:SS 72|ABC123|MYD34561|XXXX|YYYYMMDDHH:MM:SS... (4 Replies)
Discussion started by: DJose
4 Replies

7. Shell Programming and Scripting

Compare 2 columns from the same file and print a value depending on the result

Hello Unix gurus, I have a file with this format (example values): label1 1 0 label2 1 0 label3 0.4 0.6 label4 0.5 0.5 label5 0.1 0.9 label6 0.9 0.1 in which: column 1 is a row label column 2 and 3 are values I would like to do a simple operation on this table and get the... (8 Replies)
Discussion started by: ksennin
8 Replies

8. Shell Programming and Scripting

Paste columns based on common column: multiple files

Hi all, I've multiple files. In this case 5. Space separated columns. Each file has 12 columns. Each file has 300-400K lines. I want to get the output such that if a value in column 2 is present in all the files then get all the columns of that value and print it side by side. Desired output... (15 Replies)
Discussion started by: genome
15 Replies

9. UNIX for Beginners Questions & Answers

Sort by record column, Compare with conditons and export the result

Hello, I am new to Unix and would like to seek a help, please. I have 2 files (file_1 and file_2), I need to perform the following actions. 1 ) Sort the both file by the column 26-36 (which is Invoice number) what is sort command with the column sort? 2) Compare the file_1.sorted and... (3 Replies)
Discussion started by: Usagi
3 Replies

10. Shell Programming and Scripting

Join columns across multiple lines in a Text based on common column using BASH

Hello, I have a file with 2 columns ( tableName , ColumnName) delimited by a Pipe like below . File is sorted by ColumnName. Table1|Column1 Table2|Column1 Table5|Column1 Table3|Column2 Table2|Column2 Table4|Column3 Table2|Column3 Table2|Column4 Table5|Column4 Table2|Column5 From... (6 Replies)
Discussion started by: nv186000
6 Replies
SbCylinder(3)							       Coin							     SbCylinder(3)

NAME
SbCylinder - The SbCylinder class is a representation of a cylinder. This class is used within other classes in Coin. It contains data to represent a cylinder by an axis and a radius. The cylinder has no length/height value, which means it is treated as of infinite length. SYNOPSIS
#include <Inventor/SbLinear.h> Public Member Functions SbCylinder (void) SbCylinder (const SbLine &a, const float r) void setValue (const SbLine &a, const float r) void setAxis (const SbLine &a) void setRadius (const float r) const SbLine & getAxis (void) const float getRadius (void) const SbBool intersect (const SbLine &l, SbVec3f &intersection) const SbBool intersect (const SbLine &l, SbVec3f &enter, SbVec3f &exit) const void print (FILE *file) const Detailed Description The SbCylinder class is a representation of a cylinder. This class is used within other classes in Coin. It contains data to represent a cylinder by an axis and a radius. The cylinder has no length/height value, which means it is treated as of infinite length. See also: SbLine, SbSphere Constructor &; Destructor Documentation SbCylinder::SbCylinder (void) The default constructor will make a cylinder of radius 1, center axis going through origo in the parallel direction of the positive y-axis. SbCylinder::SbCylinder (const SbLine &a, const floatr) Construct and initialize an SbCylinder instance with the given axis a and radius r. Member Function Documentation void SbCylinder::setValue (const SbLine &a, const floatr) Set the axis and radius of the cylinder. See also: getAxis(), getRadius(). void SbCylinder::setAxis (const SbLine &a) Set the center axis of the cylinder. See also: setRadius(), getAxis(). void SbCylinder::setRadius (const floatr) Set the radius of the cylinder. See also: setAxis(), getRadius(). const SbLine & SbCylinder::getAxis (void) const Return the line which is the center axis of the cylinder. See also: setAxis(), getRadius(). float SbCylinder::getRadius (void) const Return radius of cylinder. See also: setRadius(), getAxis(). SbBool SbCylinder::intersect (const SbLine &l, SbVec3f &intersection) const Finds the intersection point of the ray l on the cylinder where the ray enters, and return this point in intersection. If the ray does not intersect the cylinder, FALSE is returned, otherwise we will return TRUE. SbBool SbCylinder::intersect (const SbLine &l, SbVec3f &enter, SbVec3f &exit) const Find the intersection points of the ray l on the cylinder and return these in enter and exit. If the ray just 'grazes' the cylinder, the enter and exit points have equal values. If the ray does not intersect the cylinder, FALSE is returned, otherwise we will return TRUE. void SbCylinder::print (FILE *fp) const Dump the state of this object to the file stream. Only works in debug version of library, method does nothing in an optimized compile. Author Generated automatically by Doxygen for Coin from the source code. Version 3.1.3 Wed May 23 2012 SbCylinder(3)
All times are GMT -4. The time now is 03:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy