10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to use awk to match the NM_ in file with $1 of id which is tab-delimited. The NM_ will always be in the line of file that starts with > and be after the second _. When there is a match between each NM_ and id, then the value of $2 in id is substituted or used to update the NM_. Each NM_... (3 Replies)
Discussion started by: cmccabe
3 Replies
2. Shell Programming and Scripting
Trying to use awk to add a . to $4. The input and output is tab-delimeted, but the awk seems to add a . in front of $5 and is space-delimeted. It seems close, but I am not able to produce the desired output. Thank you :).
file
chr1 948895 949015 chr1:948895-949015 ISG15
chr1 ... (1 Reply)
Discussion started by: cmccabe
1 Replies
3. Shell Programming and Scripting
I have tab delimited input that prints out in the format below:
I am trying to add field headers to $5 and $6. Not sure if sed is the best tool but my attempt is below. Thank you :).
$5 = REF
$6 = ALT
file
ID CHR START STOP
123 1 100 200 A ... (6 Replies)
Discussion started by: cmccabe
6 Replies
4. Shell Programming and Scripting
I am trying to add a condition to the below perl that will capture the GTtag and place a specific string in the last field of each line. The problem is that the GT value used is not right after the tag rather it is a few fields away. The values should always be 0/1 or 1/2 and are in bold in the... (12 Replies)
Discussion started by: cmccabe
12 Replies
5. Shell Programming and Scripting
Gents,
I have many files to change increasing 40000 in specific field.
Can you help me with a command with sed or awk to fix this problem.
Where the the field has Marker FDU. I need to add 40000 plus
example
Marker FDU 27152.00
Marker FDU 67152.00
I should... (4 Replies)
Discussion started by: jiam912
4 Replies
6. Shell Programming and Scripting
Hi Experts,
I have a tab deliminated file as below
myfile.txt
Local Group Memberships *Administrators *Guests
I need data in below format starting from 4th position.
myfile1.txt
Administrators Guests
the above one is just an example and there could... (15 Replies)
Discussion started by: Litu1988
15 Replies
7. Shell Programming and Scripting
Thank you for 4 looking this post.
We have a tab delimited file where we are facing problem in a lot of funny character. I have tried using awk but failed that is not working.
In the 5th field ID which is supposed to be a integer only of that file, we are getting corrupted data as below.
I... (12 Replies)
Discussion started by: Srithar
12 Replies
8. Shell Programming and Scripting
Hi ,
how to add the single digit to front of the word and front of the lines in the one file with compare pattern file and get digit. like example
pattern file pattern.txt
pattern num
bala 2
raja 3
muthu 4
File Name: chennai.dat
muthu is good boy
raja is bad boy
selvam in super... (6 Replies)
Discussion started by: krbala1985
6 Replies
9. UNIX for Dummies Questions & Answers
Hello,
I have about 100 files in a directory with fields which are tab delimited. I would like to append the file name as the first field and it has to be done as many times as the total lines in the file.
For example,
myFile1.txt has the following data:
1 x y z
2 a b ... (5 Replies)
Discussion started by: Gussifinknottle
5 Replies
10. Shell Programming and Scripting
Hello,
Can someone help me to do this with awk or sed? I have a file with multiple lines, each line has many fields separated with a tab. I would like to add one more field holding 'na' in between the first and second fields.
old file looks like,
1, field1 field2 field3 ...
2, field1... (7 Replies)
Discussion started by: ssshen
7 Replies