I have to merge two files:
The files are having the same format like
A0this is first line
TOlast line
silmilarly other lines.
I have to search for A0 line in the second file also and then put the data in the third file under A0 heading ,then for A1 and so on.
A0 portion will be treminated... (1 Reply)
Hi,
I have a file f1 having the contents as below
select (<condn>) from dual
I have another file f2 having the contents as below
1,
2,
3
I want to replace <condn> in f1 with the contents of f2
I tried using sed like this
sed "s:<condn>:`cat f2`:g" f1
The above command resulted in sed:... (3 Replies)
Hi All,
I do have 2 files
file 1 has 4 tab delimited columns
234 a c dfgyu
294 b g fih
302 c h jzh
328 z c san
597 f g son
File 2 has 2 tab delimted columns
234 23
302 24
597 24
I want to merge file 2 with file 1 based on the data common in both files which is the first column so... (6 Replies)
I had two files file1 and file2. I want a o/p file(file3) like below using first column as ref. Pls give suggestion ass join is not working as the number of lines in each file is nealry 5 C?
file1
---------------------
404000324810001 Y
404000324810004 N
404000324810008 Y
404000324810009 N... (1 Reply)
Hi,
I have a file which I'd like to merge lines based on duplicates in one column while keeping the info for other columns. Let me simplify it by an example:
File
ESR1 ANASTROZOLE NA FDA_approved
ESR1 CISPLATIN NA FDA_approved
ESR1 DANAZOL agonist NA
ESR1 EXEMESTANE NA FDA_approved... (3 Replies)
Hi,
I have a table to be imported for R as matrix or data.frame but I first need to edit it because I've got several lines with the same identifier (1st column), so I want to sum the each column (2nd -nth) of each identifier (1st column)
The input is for example, after sorted:
K00001 1 1 4 3... (8 Replies)
Hello :)
I am in this situation:
Input: two tab-delimited files, `File1` and `File2`. `File2` (`$2`) has to be parsed by patterns found in `File1` (`$1`).
Expected output: tab-delimited file, `File3`. `File3` has to contain the same rows as `File2`, plus the corresponding value in... (5 Replies)
I Want to merge multiple lines based on the 1st field and keep into single record.
SRC File:
AAA_POC_DB.TAB1
AAA_POC_DB.TAB2
AAA_POC_DB.TAB3
AAA_POC_DB.TAB4
BBB_POC_DB.TAB1
BBB_POC_DB.TAB2
CCC_POC_DB.TAB6
OUTPUT
-----------------
'AAA_POC_DB','TAB1','TAB2','TAB3','TAB4'... (10 Replies)
Hellow,
I have a tab-delimited file with 3 columns :
BINPACKER.13259.1.p2 SSF48239
BINPACKER.13259.1.p2 PF13243
BINPACKER.13259.1.p2 G3DSA:1.50.10.20
BINPACKER.13259.2.p2 SSF48239
BINPACKER.13259.2.p2 PF13243
BINPACKER.13259.2.p2 G3DSA:1.50.10.20... (7 Replies)
Discussion started by: anjaliANJALI
7 Replies
LEARN ABOUT BSD
join
JOIN(1) General Commands Manual JOIN(1)NAME
join - relational database operator
SYNOPSIS
join [ options ] file1 file2
DESCRIPTION
Join forms, on the standard output, a join of the two relations specified by the lines of file1 and file2. If file1 is `-', the standard
input is used.
File1 and file2 must be sorted in increasing ASCII collating sequence on the fields on which they are to be joined, normally the first in
each line.
There is one line in the output for each pair of lines in file1 and file2 that have identical join fields. The output line normally con-
sists of the common field, then the rest of the line from file1, then the rest of the line from file2.
Fields are normally separated by blank, tab or newline. In this case, multiple separators count as one, and leading separators are dis-
carded.
These options are recognized:
-an In addition to the normal output, produce a line for each unpairable line in file n, where n is 1 or 2.
-e s Replace empty output fields by string s.
-jn m Join on the mth field of file n. If n is missing, use the mth field in each file.
-o list
Each output line comprises the fields specified in list, each element of which has the form n.m, where n is a file number and m is a
field number.
-tc Use character c as a separator (tab character). Every appearance of c in a line is significant.
SEE ALSO sort(1), comm(1), awk(1)BUGS
With default field separation, the collating sequence is that of sort -b; with -t, the sequence is that of a plain sort.
The conventions of join, sort, comm, uniq, look and awk(1) are wildly incongruous.
7th Edition April 29, 1985 JOIN(1)