Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Problem when using join command Post 302569483 by forevertl on Monday 31st of October 2011 12:34:46 PM
Old 10-31-2011
Problem when using join command

Dear all,

I have two files (each only contains 1 column) as attached. I want to combined the two files and only show the common records in both files. But when I use join command only the last row was combined. Anyone know what is the problem? I don't know how to write the correct code to only show the common records also.

Thanks!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

A join problem?

Hi everybody, I am hoping somebody here will be either be able to solve my troubles or at least give me a push in the right direction :) . I am developing a shell script to read in 4 different files worth of data that each contain a list of: username firstname secondname group score I... (2 Replies)
Discussion started by: jamjamjammie
2 Replies

2. Shell Programming and Scripting

join (pls help on join command)

Hi, I am a new learner of join command. Some result really make me confused. Please kindly help me. input: file1: LEO oracle engineer 210375 P.Jones Office Runner ID897 L.Clip Personl Chief ID982 S.Round UNIX admin ID6 file2: Dept2C ID897 6 years Dept5Z ID982 1 year Dept3S ID6 2... (1 Reply)
Discussion started by: summer_cherry
1 Replies

3. Shell Programming and Scripting

Problem with Join command

Hi guyz Excuse me for posting simple question I tried join and sort and other perl commands but failed I have 2 files. 1st file contain single column with around 6000 values (rows). Second file contain 2 columns 1st column is the same column (in 1st file) but randomly ordered and second... (5 Replies)
Discussion started by: repinementer
5 Replies

4. Shell Programming and Scripting

awk command for simple join command but based on 2 columns

input1 a_a a/a 10 100 a1 a_a 20 200 b1 b_b 30 300 input2 a_a a/a xxx yyy a1 a1 lll ppp b1 b_b kkk ooo output a_a a/a 10 100 xxx yyy (2 Replies)
Discussion started by: ruby_sgp
2 Replies

5. UNIX for Dummies Questions & Answers

SOLVED: Join problem

Hello, Going through book, "Guide to UNIX Using Linux". I am doing one of the projects that has me writing scripts to join files. Here is my pnumname script and I am extracting the programmers names and numbers from the program file and redirecting the output to the file pnn. I then created a... (0 Replies)
Discussion started by: thebeav
0 Replies

6. UNIX for Dummies Questions & Answers

problem with join

So I want to join two files that have a lot of rows The file named gen1 has 2 columns: head gen1 1008567 0.4026931012 1119535 0.7088912314 1120590 0.7093805634 1145994 0.7287952590 1148140 0.7313924434 1155173 0.7359550430 1188481 0.7598914553 1201155 0.7663406553 1206921... (2 Replies)
Discussion started by: peanuts48
2 Replies

7. UNIX for Dummies Questions & Answers

how to join two files using "Join" command with one common field in this problem?

file1: Toronto:12439755:1076359:July 1, 1867:6 Quebec City:7560592:1542056:July 1, 1867:5 Halifax:938134:55284:July 1, 1867:4 Fredericton:751400:72908:July 1, 1867:3 Winnipeg:1170300:647797:July 15, 1870:7 Victoria:4168123:944735:July 20, 1871:10 Charlottetown:137900:5660:July 1, 1873:2... (2 Replies)
Discussion started by: mindfreak
2 Replies

8. UNIX for Dummies Questions & Answers

How to use the the join command to join multiple files by a common column

Hi, I have 20 tab delimited text files that have a common column (column 1). The files are named GSM1.txt through GSM20.txt. Each file has 3 columns (2 other columns in addition to the first common column). I want to write a script to join the files by the first common column so that in the... (5 Replies)
Discussion started by: evelibertine
5 Replies

9. UNIX for Dummies Questions & Answers

Weird problem with join command

I have a weird issue going on with the join command... I have two files I am trying to join...here is a line from each file with the important parts marked in red: file1: /groupspace/ccops/cmis/bauwkrcn/commsamp_20140315.txt,1 file2:... (3 Replies)
Discussion started by: dbiggied
3 Replies

10. Shell Programming and Scripting

Problem with Join Command

I have 2 files. File 1 is a daily file with only a bunch of IDs and a date column. File 2 has all the dump of IDs and their respective cost. I basically want an inner join. When I am picking a few rows from these files and joining, they work perfectly fine. But when I join the full files together,... (13 Replies)
Discussion started by: Varshha
13 Replies
COMPARE-HISTOS(1)						   User Commands						 COMPARE-HISTOS(1)

NAME
compare-histos - generate comparison histograms SYNOPSIS
compare-histos [options] aidafile1[:'PlotOption1=Value':'PlotOption2=Value'] [aidafile2 ...] OPTIONS
-h, --help show this help message and exit -R, --rivet-refs use Rivet reference data files (default) --no-rivet-refs don't use Rivet reference data files -o OUTDIR, --outdir=OUTDIR write data files into this directory --hier-out write output dat files into a directory hierarchy which matches the analysis paths --plotinfodir=PLOTINFODIR directory which may contain plot header information (in addition to standard Rivet search paths) --no-rmgapbins disable attempting to remove 'gap' bins from MC histos when they don't appear in the ref file --refid=REF_ID ID of reference data set (file path for non-REF data) --linear plot with linear scale --logarithmic plot with logarithmic scale (default behaviour) --mc-errs show vertical error bars on the MC lines --no-ratio disable the ratio plot --rel-ratio show the ratio plots scaled to the ref error --abs-ratio show the ratio plots with an absolute scale --no-plottitle don't show the plot title on the plot (useful when the plot description should only be given in a caption) --style=STYLE change plotting style: default|bw|talk -c CONFIGFILES, --config=CONFIGFILES additional plot config file(s). Settings will be included in the output configuration. --show-single=SHOW_SINGLE control if a plot file is made if there is only one dataset to be plotted [default=mc]. If the value is 'no', single plots are always skipped, for 'ref' and 'mc', the plot will be written only if the single plot is a reference plot or an MC plot respectively, and 'all' will always create single plot files. The 'ref' and 'all' values should be used with great care, as they will also write out plot files for all reference histograms without MC traces: combined with the -R /--rivet-refs flag, this is a great way to write out several thousand irrelevant reference data histograms! --show-mc-only, --all make a plot file even if there is only one dataset to be plotted and it is an MC one. Deprecated and will be removed: use --show-single instead, which overrides this. -m PATHPATTERNS, --match=PATHPATTERNS Only write out histograms whose $path/$name string matches these regexes. The argument may also be a text file. -M PATHUNPATTERNS, --unmatch=PATHUNPATTERNS Exclude histograms whose $path/$name string matches these regexes -q, --quiet Suppress normal messages -v, --verbose Add extra debug messages The plot options are described in the make-plots manual in the HISTOGRAM section. AUTHOR
This manual page was written by Lifeng Sun <lifongsun@gmail.com> for the Debian system (but may be used by others). Rivet June 2012 COMPARE-HISTOS(1)
All times are GMT -4. The time now is 03:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy