10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Trying to use awk to format the input based on the filed count being 5. Most lines are fine using the awk below, except the first two lines. I know the reason is the -1 in green and -2 in blue. But can not figure out how to not split on the - if it is followed by a digit then letter. Thank you :).... (1 Reply)
Discussion started by: cmccabe
1 Replies
2. Shell Programming and Scripting
The awk below uses the tab-delimeted fileand reformats each line based on one of three conditions (rules). The 3 rules are for deletion (lines in blue), snv (line in red), and insertion (lines in green). I have included all possible combinations of lines from my actual data, which is very large.... (0 Replies)
Discussion started by: cmccabe
0 Replies
3. Shell Programming and Scripting
I am trying to use awk to print lines that satisfy either of the two conditions below:
condition 1: $2 equals CNV and the split of $3, the value in red, is greater than or equal to 4. ---- this is a or so I think
condition 2: $2 equals CNV and the split of $3, the value in red --- this is a... (4 Replies)
Discussion started by: cmccabe
4 Replies
4. 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
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
Hi Everyone,
# cat 1
a
b b
cc
1
2
3 3 3
4
55 5
a
b (2 Replies)
Discussion started by: jimmy_y
2 Replies
8. Shell Programming and Scripting
Hi Folks!
I have a file like this
000000006 dist:0.0 FILE ./MintRoute/MultiHopWMEWMA.nc LINE:305:1 NODE_KIND:131 nVARs:4 NUM_NODE:66 TBID:733 TEID:758
000000000 dist:0.0 FILE ./Route/MultiHopLEPSM.nc LINE:266:1 NODE_KIND:131 nVARs:4 NUM_NODE:66 TBID:601 TEID:626
000000001 ... (2 Replies)
Discussion started by: jackoverflow
2 Replies
9. Shell Programming and Scripting
Hi folks,
I have a text file that I need to parse, and I cant figure it out. The source is a report breaking down softwares from various companies with some basic info about them (see source snippet below). Ultimately what I want is an excel sheet with only Adobe and Microsoft software name and... (5 Replies)
Discussion started by: rowie718
5 Replies
10. Shell Programming and Scripting
Below is the code
nawk -F"|" 'tolower($1) ~ "abc" |"" {if (tolower($2) ~"abc"|"") print$0}' file
I want the records from file whose 1st and 2nd field should be either "abc" or "null"
I tried but its giving error.
Appreciate help (2 Replies)
Discussion started by: pinnacle
2 Replies