10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi friends,
i want to compare first columns from two different files ,if equal print the file2's second column else print the zero.Please help me...
file1:
a
b
c
d
efile2:
a 1
c 20
e 30
desired output:
1
0
20
0
30
Please use CODE tags as required by forum rules!
Please post in... (1 Reply)
Discussion started by: bhaskar illa
1 Replies
2. Shell Programming and Scripting
Hi All,
I am looking to join two files where column 1 of file A matches with column 1 of file B and column 5 of files A matches with column 2 of file B. After joining the files based on above condition, out should contain entire line of file A and column 3, 4 and 5 of file B.
Here is sample... (8 Replies)
Discussion started by: angshuman
8 Replies
3. Shell Programming and Scripting
Hello All
I'm joining two files using Awk by Left outer join on the file 1
File 1
1 AA
2 BB
3 CC
4 DD
File 2
1 IND 100 200 300
2 AUS 400 500 600
5 USA 700 800 900 (18 Replies)
Discussion started by: venkat_reddy
18 Replies
4. Shell Programming and Scripting
Hi All,
I have a XML file which is looks like as below. <<please see the attachment >>
<?xml version="1.0" encoding="UTF-8"?>
<esites>
<esite>
<name>XXX.com</name>
<storeId>10001</storeId>
<module>
... (4 Replies)
Discussion started by: Rajeev_hbk
4 Replies
5. UNIX for Dummies Questions & Answers
Hello again,
I am trying to join 3rd column of 3 files into the end on one file and save it separately... my data looks like this
file 1
Bob, Green, 80
Mark, Brown, 70
Tina, Smith, 60
file 2
Bob, Green, 70
Mark, Brown, 60
Tina, Smith, 50
file 3
Bob, Green, 50
Mark, Brown,60
Tina,... (6 Replies)
Discussion started by: A-V
6 Replies
6. Shell Programming and Scripting
I have two text files that look something like this:
A:B:C 123
D:E:F 234
G:H:I 345
J:K:L 123
M:N:O 456
P:Q:R 567
A:B:C 456
D:E:F 567
G:H:I 678
J:K:L 456
M:N:O 789
P:Q:R 890
I want to find the line where the first column matches and then combine the second columns into a single... (8 Replies)
Discussion started by: pbluescript
8 Replies
7. Shell Programming and Scripting
Hi again,
I have monthly one-column files of roughly around 10 years. Is there a more efficient way to concatenate these files column-wise other than using paste command? For instance:
file1.txt
12
13
15
12
file2.txt
14
15
18
19
file3.txt
20
21 (8 Replies)
Discussion started by: ida1215
8 Replies
8. Shell Programming and Scripting
foo.txt
1 rs2887286 0 1145994 C T
1 rs1240743 0 1323299 C A
1 rs1695824 0 1355433 G T
1 rs3766180 0 1468016 G A
1 rs7519837 0 1500664 A G
1 rs2272908 0 ... (12 Replies)
Discussion started by: genehunter
12 Replies
9. Shell Programming and Scripting
Hi
I have to join two files based on 1st column where 4th column of a2.txt=at and take 2nd column of a1.txt and 3rd column of a2.txt and check against source files ,if matches list those source file names.
a1.txt
a1|20090809|20090810
a2|20090907|20090908
a2.txt
a1|d|file1.txt|at... (9 Replies)
Discussion started by: akil
9 Replies
10. Shell Programming and Scripting
I've got two files, File1 and File2
File 1 has got combination of col1, col2 and col3 which comes on file2 as well, file2 does not get
col4. Now based on col1, col2 and col3, I would like to get col4 from file1 and all the columns from file2 in a new file
Any ideas?
File1
------
Col1 col2... (11 Replies)
Discussion started by: rudoraj
11 Replies