10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Join and merge multiple files with duplicate key and fill void columns
Hi guys,
I have many files that I want to merge:
file1.csv:
1|abc
1|def
2|ghi
2|jkl
3|mno
3|pqr
file2.csv: (5 Replies)
Discussion started by: yjacknewton
5 Replies
2. Shell Programming and Scripting
Hi,
I am trying to join 2 csv files, to create a 3rd output file with the joined data.
Below is an example of my Input Data:
Input File 1
NAME, FAV_FOOD, FAV_DRINK, ID, GENDER
Bob, Fish, Coke, 1, M
Lisa, Rice, Water, 2, F
Jenny, Noodle, Tea, 3, F
Ken, Pizza, Coffee, 4, M
Lisa,... (7 Replies)
Discussion started by: RichZR
7 Replies
3. Shell Programming and Scripting
Hi,
I have a file pk.txt which has pk data in following format
TableName | PK
Employee | id
Contact|name,country
My Output should be
Employee | t1.id=s.id
Contact| t1.name=s.name AND t1.country=s.country
I started of like this:
for LIST in `cat pk.txt` do... (5 Replies)
Discussion started by: wahi80
5 Replies
4. UNIX for Dummies Questions & Answers
I have file input1.txt
11103|11|OTTAWA|City|AA|CAR|0|0|1|-1|0|8526|2014-09-07 23:00:14
11103|11|OTTAWA|City|BB|TRAIN|0|0|2|-2|6|6359|2014-09-07 23:00:14
11104|11|CANADA|City|CC|CAR|0|0|2|-2|0|5947|2014-09-07 23:00:14
11104|11|CANADA|City|DD|TRAIN|0|0|2|-2|1|4523|2014-09-07 23:00:14... (5 Replies)
Discussion started by: radius
5 Replies
5. Shell Programming and Scripting
I have two text files as shown below
cat file1.txt
Id leng sal mon
25671 34343 56565 5565
44888 56565 45554 6868
23343 23423 26226 6224
77765 88688 87464 6848
66776 23343 63463 4534
cat file2.txt
Id number
25671 34343
76767 34234
23343 23423
66776 23343 (4 Replies)
Discussion started by: halfafringe
4 Replies
6. Shell Programming and Scripting
Hi All,
I am trying to join to files based on one common column.
Cat File1
ID HID
Ab_1 23
Cd 45
df 22
Vv 33
Cat File2
ID pval
Ab_1 0.3
Cd 10
Vv 0.0444 (3 Replies)
Discussion started by: newpro
3 Replies
7. Shell Programming and Scripting
So I have 2 files:
File 1:
111,Mike,Stipe
222,Peter,Buck
333,Mike,Mills
File 2:
222,Mr,Bono
444,Mr,Edge
I want output to be below, where 222 records joined and all none joined records still in output
111,Mike,Stipe
222,Peter,Buck,Mr,Bono
333,Mike,Mills
444,Mr,Edge (4 Replies)
Discussion started by: stack
4 Replies
8. Shell Programming and Scripting
Hi All,
I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations:
1. I am restrained to 2 input files only.
2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies
9. UNIX for Advanced & Expert Users
hi, i have
file 1:
======
0501000|X1
0502000|X2
0501231|X3
0981222|X4
0502000|X6
0503000|X7
0932322|X8
file 2:
=======
050
0501
0502
09
098 (1 Reply)
Discussion started by: magedfawzy
1 Replies
10. Shell Programming and Scripting
I'm new of UNIX shell scripting. I'm recently generating a excel report in UNIX(file with delimiter is fine). How should I make a script to do it?
1 file to join comes from output of one UNIX command, the second from another UNIX command, and third from a database query. The key columes of all... (7 Replies)
Discussion started by: bigsmile
7 Replies