10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
i have 2 files , the data i need to match is in masterfile and i need to pull out column 3 from master if column 1 and 2 match and output entire row to new file
I have tried with join and awk and i keep getting blank outputs or same file
is there an easier way than what i am... (4 Replies)
Discussion started by: axis88
4 Replies
2. UNIX for Dummies Questions & Answers
Hi Help,
I have two files namely a.txt and b.txt
a.txt looks like
a.txt
1 2 2
1 3 3
2 4 4
4 5 6
6 7 7
b.txt looks like,
b.txt
1 2 1
1 3 2
2 4 3
3 4 4
4 5 5 (2 Replies)
Discussion started by: Indra2011
2 Replies
3. Shell Programming and Scripting
I would like to join two files when two columns in each file matches with each other and then produce an output when taking multiple columns.
Like I have file A
1234,ABCD,23,JOHN,NJ,USA
2345,ABCD,24,SAM,NY,USA
5678,GHIJ,24,TOM,NY,USA
5678,WXYZ,27,MAT,NJ,USA
and file B
... (2 Replies)
Discussion started by: mady135
2 Replies
4. Shell Programming and Scripting
Hello,
I have data in following format. ... (6 Replies)
Discussion started by: Pushpraj
6 Replies
5. UNIX for Advanced & Expert Users
HI,
I have 2 different questions in this thread.
Consider 2 files as input (input file have different line count )
File 1
1 1 625 56
1 12 657 34
1 9 25 45 1
2 20 54 67
3 25 35 27
4 45 73 36
5 125 56 45
File2
1 1 878 76
1 9 83 67
2 20 73 78
4 47 22 17
3 25 67 99 (4 Replies)
Discussion started by: rossi
4 Replies
6. Shell Programming and Scripting
Hi,
I have multiple files that each contain one column of strings:
File1:
123abc
456def
789ghi
File2:
123abc
456def
891jkl
File3:
234mno
123abc
456def
In total I have 25 of these type of file. (5 Replies)
Discussion started by: owwow14
5 Replies
7. Shell Programming and Scripting
Normal grep is not working to get the output.
Sample Input:
newjob: abc
command name: a=b+c
newjob: bbc
command name: c=r+v
newjob:ddc
newjob:kkc
command name: c=l+g
newjob:mdc
newjob:ldc
newjob:kjc
command name: u=dl+g
newjob:lkdc
newjob:lksdc
command name: o=udl+g (6 Replies)
Discussion started by: onesuri
6 Replies
8. Shell Programming and Scripting
I have two files... file1 and file2.
Where columns 1 and 2 of file1 match columns 1 and 2 of file2 I want to create a new file that is all file1 + columns 3 and 4 of file2
:b: Many thanks if you know how to do this.... :b:
file1
31-101 106 0 92
31-101 106 29 ... (2 Replies)
Discussion started by: pelhabuan
2 Replies
9. Shell Programming and Scripting
Hi All,
I have to match each row in file 1 with 1st row in file 2 and print the corresponding column from file2. I am trying to use an awk script to do this. For example
cat File1
X1
X3
X4
cat File2
ID X1 X2 X3 X4
A 1 6 2 1
B 2 7 3 3
C 3 8 4 1
D 4 9 1 1 (3 Replies)
Discussion started by: newpro
3 Replies
10. Shell Programming and Scripting
Hi guys,
I need some help to come out with a solution . I have seven such files but I am showing only three for convenience.
filea
a5 20
a8 16
fileb
a3 42
a7 14
filec
a5 23
a3 07
The output file shoud contain the data in table form showing first field of... (7 Replies)
Discussion started by: smriti_shridhar
7 Replies