10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In the awk below I am trying to print only the header lines starting with # or ## and the lines that $7 is PASS and AF= is less than 5%. The awk does execute but returns an empty file and I am not sure what I am doing wrong. Thank you.
file
... (0 Replies)
Discussion started by: cmccabe
0 Replies
2. Shell Programming and Scripting
I am trying to modify and understand an awk written by @Scrutinizer
The below awk will filter a list of 30,000 lines in the tab-delimited file. What I am having trouble with is adding a condition to SVTYPE=CNV
that will only print that line if CI=,0.95: portion in blue in file is <1.9.
The... (2 Replies)
Discussion started by: cmccabe
2 Replies
3. Shell Programming and Scripting
In the awk below I am trying to print out those lines in file2 that are no between $2 and $3 in file1. Both files are
tab-delimeted and I think it's close but currently it is printeing out the matches. The --- are not part of the files they are just to show what lines match or fall into
the range... (6 Replies)
Discussion started by: cmccabe
6 Replies
4. 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
5. Shell Programming and Scripting
In the tab delimited files below I am trying to match $2 in file1 to $2 of file2. If a match is found the awk checks $3 of file2 and if it is greater than 40% and $4 of file2 is greater than 49, the line in file1 is printed. In the desired output line3 of file1 is not printed because $3 off file2... (9 Replies)
Discussion started by: cmccabe
9 Replies
6. UNIX for Dummies Questions & Answers
Dear Masters,
I have 2 files input below
file1
8269229289|CROATIA|LUX
8269229412|ASIA|LUX
8269229371|EUROPE|LUX
8269229355|LANE|LUX
8269229469|SWISS|LUX
8269229477|HAMBURG|LUX
8269229484|EGYPT|LUX
8269229485|GERMANY|LUX
8269229498|CROATIA|LUX
File2
8269229289|1100100020... (6 Replies)
Discussion started by: radius
6 Replies
7. Shell Programming and Scripting
Hey,
Need some help for command to print only lines with two columns in a file
abc 111
cde 222
fgh
ijk 2
klm 12 23
nop
want the ouput to be
abc 111
cde 222
ijk 2
Thanks a lot in advance!!! (3 Replies)
Discussion started by: leo.maveriick
3 Replies
8. Shell Programming and Scripting
Dear All,
a.txt
A 1 Z
A 1 ZZ
B 2 Y
B 2 AA
how can i use awk one line to achieve the result:
A Z|ZZ
B Y|AA
Thanks (5 Replies)
Discussion started by: jimmy_y
5 Replies
9. Shell Programming and Scripting
Hi,
I have two comma separated files. I would like to see field 1 value of File1 exact match in field 2 of File2. If the value matches, then it should print matched lines from File2. I have achieved the results using cut, paste and egrep -f but I would like to use awk as it is efficient way and... (7 Replies)
Discussion started by: SBC
7 Replies
10. Shell Programming and Scripting
I am using a seed file shown below to separate cisco devices by ios/os type. I want to bunch all the devices based on ios/os version. Once I find a match, I only want to push the ip address into the appropriate array.
Example of seedfile
8 host1 (C3500XL-C3H2S-M) 11.0(5)WC17 10.1.44.21
9... (1 Reply)
Discussion started by: popeye
1 Replies