10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I thought I had this figured out but was wrong so am humbly asking for help.
The task is to add an additional column to FILE 1 based on records in FILE 2.
The key is in COLUMN 1 for FILE 1 and in COLUMN 1 OR COLUMN 2 for FILE 2.
I want to add the third column from FILE 2 to the beginning of... (8 Replies)
Discussion started by: andmal
8 Replies
2. Shell Programming and Scripting
Hello , I have several files which are looking similar to :
file01.txt
keyA001 350 X string001 value001
keyA001 450 X string002 value007
keyA001 454 X string002 value004
keyA001 500 X string003 value005
keyA001 255 X string004 value006
keyA001 388 X string005 value008
keyA001 1278 X... (4 Replies)
Discussion started by: alex2005
4 Replies
3. Shell Programming and Scripting
Hi,
I am struggling with the an awk command to merge two files based on a common key.
I want to append the value from File2 ($2) onto the end of File1 where $1 from each file matches - If no match then nothing is apended
File1
COL1|COL2|COL3|COL4|COL5|COL6|COL7... (3 Replies)
Discussion started by: Ads89
3 Replies
4. UNIX for Dummies Questions & Answers
Hi, I am trying to selectively merge two files based on keys reported in the 1st column.
File1:
#file1-header1
file1-header2
111 qwe rtz uio
198 asd fgh jkl
165 yxc
789 poi uzt rew
89 lkj
File2:
#file2-header2
file2-header2
165 ghz nko2 ... (2 Replies)
Discussion started by: dovah
2 Replies
5. UNIX for Dummies Questions & Answers
I have a requirement where in i need to select records right below the search criteria
qwertykeyboard white
10 20 30
30 40 50
60 70 80
qwertykeyboard black
40 50 60
70 90 100
qwertykeyboard and white are headers separated by a tab.
when i execute my script..i would be searching... (4 Replies)
Discussion started by: vinnu10
4 Replies
6. Shell Programming and Scripting
Hi,
I want to merge the two files based on the key file's columns.
The key file:
DATE~DATE
HOUSE~IN_HOUSE
CUST~IN_CUST
PRODUCT~PRODUCT
ADDRESS~CUST_ADDR
BASIS_POINTS~BASIS_POINTS
...
The other 2 files are From_file & To_file -
The From_file:
DATE|date/time|29|9 ... (9 Replies)
Discussion started by: dips_ag
9 Replies
7. Shell Programming and Scripting
Hi,
On a similar subject, the following. I have two files:
file1.txt
dbSNP_rsID,Chromosome,Position,Gene
rs10399749,chr. 01,45162,?
rs4030303,chr. 01,72434,?
rs4030300,chr. 01,72515,?
rs940550,chr. 01,78032,?
rs13328714,chr. 01,81468,?
rs11490937,chr. 01,222077,?
rs6683466,chr.... (5 Replies)
Discussion started by: swvanderlaan
5 Replies
8. 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
9. Shell Programming and Scripting
Hi Friends,
Can any one help me with merging these file based on two columns :
File1:
A|123|99|SAMS
B|456|95|GEORGE
D|789|85|HOVARD
File2:
S|123|99|NANcY|6357
S|123|99|GREGRO|83748
A|456|95|HARRY|827|somers
S|456|95|ANTONY|546841|RUDOLPH|7263
B|456|95|SMITH|827|BOISE STATE|834... (3 Replies)
Discussion started by: sbasetty
3 Replies
10. Shell Programming and Scripting
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)
Discussion started by: Vandana Yadav
1 Replies