10 More Discussions You Might Find Interesting
1. 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
2. UNIX for Beginners Questions & Answers
I have 2 tab-delimited input files as follows.
green A apple
red B apple
apple - A;Z
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. Shell Programming and Scripting
Given two files (test1 and test2) with the following contents:
80279867,PT01I need to do some... (3 Replies)
Discussion started by: gacanepa
4. Shell Programming and Scripting
In the below I am trying to use awk to match all the $13 values in input, which is tab-delimited,
that are in $1 of gene which is just a single column of text.
However only the line with the greatest $9 value in input needs to be printed.
So in the example below all the MECP2 and LTBP1... (0 Replies)
Discussion started by: cmccabe
5. Shell Programming and Scripting
I have a file as below
<field1> <field2> <field3> ... <field_num1> <field_num2>
Trying to sort based on difference of <field_num1> and <field_num2> in desceding order and print all fields.
I tried this and it doesn't sort on the difference field .. Appreciate your help.
cat... (9 Replies)
Discussion started by: newstart
6. UNIX for Dummies Questions & Answers
I want to extract rows with the pattern ALPHANUMERIC/ALPHANUMNERIC in the 2nd column.
I dont wan rows with more than 1 slash or without any slash in 2nd column.
I came up with the regex
grep '\/$' file
d t/y (3 Replies)
Discussion started by: jianp83
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
I need to print the first field first then last two fields should come next and then i need to print rest of the fields.
a1,b1,b2,abc,jsd,fhf,fkk... (6 Replies)
Discussion started by: 100bees
9. Shell Programming and Scripting
Lets say I have the following text file:
name, lastname, 1234, firstname.lastname@example.org
name1, lastname1, email@example.com, 2345
name, 3456, lastname, firstname.lastname@example.org
4567, name, lastname, email@example.com
I now need the following output:
1234... (5 Replies)
Discussion started by: domi55
10. Shell Programming and Scripting
I am writing a program to run through two large lists of data (~300,000 rows), find where rows in one file match another, and combine them based on matching fields. Due to the large file sizes, I'm guessing AWK will be the most efficient way to do this. Overall, the input and output I'm... (5 Replies)
Discussion started by: Michelangelo