10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello all, I am having trouble with what should be an easy task, but seem to be missing something fundamental. I have two files, with File 1 consisting of a single field of many thousands of records. I also have File 2 with two fields and many thousands of records.
My goal is that when $1 of... (2 Replies)
Discussion started by: jvoot
2 Replies
2. UNIX for Beginners Questions & Answers
I apologize in advance, but I continue to have trouble searching for matches between two files and then printing portions of each to output in awk and would very much appreciate some help.
I have data as follows:
File1
PS012,002 PRQ 0 1 1 17 1 0 -1 3 2 1 2 -1 ... (7 Replies)
Discussion started by: jvoot
7 Replies
3. Shell Programming and Scripting
Trying to use awk to match the contents of each line in file1 with $5 in file2. Both files are tab-delimited and there may be a space or special character in the name being matched in file2, for example in file1 the name is BRCA1 but in file2 the name is BRCA 1 or in file1 name is BCR but in file2... (6 Replies)
Discussion started by: cmccabe
6 Replies
4. UNIX for Beginners Questions & Answers
Hi,
I have 2 tab-delimited input files as follows.
file1.tab:
green A apple
red B apple
file2.tab:
apple - A;Z
Objective:
Return $1 of file1 if,
. $1 of file2 matches $3 of file1 and,
. any single element (separated by ";") in $3 of file2 is present in $2 of file1
In order to... (3 Replies)
Discussion started by: beca123456
3 Replies
5. Shell Programming and Scripting
Dear AWK-experts!
I did get stuck in the task of combining files after matching fields, so I'm still awkward with learning AWK.
There are 2 files: one containing 3 columns with ID, coding status, and score for long noncoding RNAs:
file1 (1.txt) (>5000 lines)
... (12 Replies)
Discussion started by: kben
12 Replies
6. Shell Programming and Scripting
Hello,
I am newbie in awk. I have just started learning it.
1) I have input file which looks like:
{4812 4009 1602 2756 306} {4814 4010 1603 2757 309} {8116 9362 10779 }
{10779 10121 9193 10963 10908} {1602 2756 306 957 1025} {1603 2757 307}
and so on.....
2) In output:
a)... (10 Replies)
Discussion started by: kajolo
10 Replies
7. Shell Programming and Scripting
Hi guys,
I couldn't find solution to this problem. If anyone knows please help me out.
your guidance is highly appretiated.
I have two files -
FILE1 has the following 7 columns ( - has been added to make columns visible enough else columns are separated by single space)
155.34 - leg - 1... (8 Replies)
Discussion started by: smriti_shridhar
8 Replies
8. Shell Programming and Scripting
Hi there,
I have two files. What I want to do is search for the values in second field of file1 in the 6th field of the file2 and of they match to add the fields 1-5 of the file2 at the end of the line of file1 with a comma before.
E.g
File1
FWB,CHUAGT87HUMAS/BUD01,REUAIR08KLM... (3 Replies)
Discussion started by: sickboy
3 Replies
9. Shell Programming and Scripting
I am using:
ps -A -o command,%cpu
to get process and cpu usage figures. I want to use awk to split up the columns it returns. If I use:
awk '{print "Process: "$1"\nCPU Usage: "$NF"\n"}'
the $NF will get me the value in the last column, but if there is more than one word in the... (2 Replies)
Discussion started by: json4639
2 Replies
10. Shell Programming and Scripting
Hi, How can I match the first two fields of file2 against the first two fields of file1 and where they match combine the two lines. If the name
(example-Aidan Rielly) is in file1 but not in file2 then just write the info from file1 to the combined output file. If the name
(example-Silvia... (5 Replies)
Discussion started by: p3t3r
5 Replies