awk to print missing and keep sequential ordering if not found
The below awk in bold will look for the ids in file1 in $2 of file2 and if they match print the line in file2. If an id is missing or not found in file2 (like BMPR2 in line4 of file1) I can not figure out how to add it to them to the lines in the output as missing in $3 following the same format. That is with the next sequential number in $1, the id from file1 in $2, and the word missing in $3. My attempt at doing this is the modified awk which does execute but the output is all of
not the desired output and I am not sure why? There may be multiple lines that are missing in my actual data but the files are always the same format as below. Thank you .
file1 tab-delimeted
file2 tab-delimeted
awk
output of command BMPR2 is not found so it is not printed
modified awk
desired output tab-delimeted
I am looking to move matching lines (01 - 07) from File1 and 77 tab the matching string from File2, to File3.txt. I am almost done but
- Currently, script is not printing lines to File3.txt in order.
Thanks a lot.
Any help is appreciated.
Script I am using:
awk 'FNR == NR && ! /^]*$/ {... (9 Replies)
URGENT HELP IS NEEDED!!
I am looking to move matching lines (01 - 07) from File1 and 77 tab the matching string from File2, to File3.txt. I am almost done but
- Currently, script is not printing lines to File3.txt in order.
- Also the matching lines are not moving out of File1.txt
... (1 Reply)
I have a file that I need to find each interface that has move-group on the interface line and print this line if the lines under the interface does Not have "filter-shared 14".
Example file:
interface 1/1/1/0 move-group
decription one one one zero
no shut
filter-shared 14... (21 Replies)
Is there a way with aw to print all lines after a string is found
There is a file like this
.......
........
2012/19/11 :11.58 PM some data
lne no date
2012/19/11 :11.59 PM some other data
2012/20/11 :12.00 AM some other data
some line without dates
some more lines without dates... (8 Replies)
Is it possible to re-order certain rows as columns (of large files).
Few lines from the file for reference.
input
Splicing Factor: Tra2beta, Motif: aaguguu, Cutoff: 0.5000
Sequence Position Genomic Coordinate K-mer Score
97 chr1:67052604 uacuguu 0.571
147... (3 Replies)
Hi all,
I have a large column of numbers like
5.6789
2.4578
9.4678
13.5673
1.6589
.....
I am trying to make an awk code so that awk can easily go through the column and arrange the numbers from least to highest like
1.6589
2.4578
5.6789
.......
can anybody suggest, how can I do... (5 Replies)
Hello All!
As a beginner user i want to add up sequential values in a text file and want to print total sum as output.The Text file will have values like the following:
class1{root}>less SUM.txt
1140.00 1155.00 1183.00 ... # it continues #
i tried to write a... (1 Reply)
So, I've got a ton of files that I want to go through (ie something like 300,000), and they're all labeled sequentially. However I'm not 100% positive that they are all there.
Is there any way of running through a sequence of numbers, checking if the file is in the folder, if not appending it... (2 Replies)
We have to convert a sequential file to a 80 char line sequential file (HP UX platform).The sequential file contains special characters. which after conversion of the file to line sequential are getting coverted into "new line" or "tab" and file is getting distorted. Is there any way to read these... (2 Replies)