10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have some data that looks like this:
PXD= ZW< 1,6
QR> QRJ== 1,2(5)
QR> QRJ== 4,1(2)
QR> QRJ== 4,2
QRB= QRB 4,2
QWM QWM 6,2
R<C ZW< 11,2
R<H= R<J= 6,1
R>H XZJ= 1,2(2)
R>H XZJ= 2,6(2)
R>H XZJ= 4,1(2)
R>H XZJ= 6,2
RDP RDP 1,2
What I would like to do is if fields $1 and $2 are... (5 Replies)
Discussion started by: jvoot
5 Replies
2. Shell Programming and Scripting
In the awk below I am trying to print the entire line, along with the header row, if $2 is SNV or MNV or INDEL. If that condition is met or is true, and $3 is less than or equal to 0.05, then in $7 the sub pattern :GMAF= is found and the value after the = sign is checked. If that value is less than... (0 Replies)
Discussion started by: cmccabe
0 Replies
3. Shell Programming and Scripting
data:
hello--hello1--hello2--#growncars#vello--hello3--hello4--jello#growncars#dello--gello--gelloA--gelloB#growncars#
I want to be able to print all the values that are found between the patterns "#growncars#" and the next "#growncars#" on the same line.
so the output should be:
... (8 Replies)
Discussion started by: SkySmart
8 Replies
4. Shell Programming and Scripting
Hello experts
I have a file with paragraphs begining with a keeping date and ending with "END":
20120301 num num
John num num A keepnum1 num num
kathrin num num A keepnum1 num num
kathrin num num B keepnum2 num num
Pete num num A keepnum1 num num
Jacob num... (2 Replies)
Discussion started by: phaethon
2 Replies
5. Shell Programming and Scripting
Hi All!!! :-)
I need a command that will print each line of a text file UNLESS the 3rd field of that line is equal to the number 999. (space seperated fields)
Solaris10/BASH SHELL:
INPUT.TXT
aaa bbb 111 222
ccc ddd 333 444
eee fff 999 555
ggg hhh 666 777
aaa bbb 999 222
ccc ddd 333... (7 Replies)
Discussion started by: ajp7701
7 Replies
6. Shell Programming and Scripting
Hi all,
I am new to using awk and am quickly discovering what a powerful pattern-recognition tool it is. However, I have what seems like a fairly basic task that I just can't figure out how to perform in one line. I want awk to find and print all the lines in which one of multiple patterns (e.g.... (8 Replies)
Discussion started by: elgo4
8 Replies
7. Shell Programming and Scripting
how to use "awk" to print any record has pattern not equal ? for example my file has 5 records & I need to get all lines which $1=10 or 20 , $2=10 or 20 and $3 greater than "130302" as it shown :
10 20 1303252348212B030
20 10 1303242348212B030
40 34 1303252348212B030
10 20 ... (14 Replies)
Discussion started by: arm
14 Replies
8. Shell Programming and Scripting
Hi.
I have a tab separated file that has a couple nearly identical lines. When doing:
sort file | uniq > file.new
It passes through the nearly identical lines because, well, they still are unique.
a)
I want to look only at field x for uniqueness and if the content in field x is the... (1 Reply)
Discussion started by: rocket_dog
1 Replies
9. Shell Programming and Scripting
Hi Everyone,
a.txt
a b c 1 e e e e e
a b c 2 e e e e e
the output is
a b c 1 e e e e e
a 00b c 2 e e e e e
when 4th field = '2', then add '00' in the front of 2nd field value.
Thanks (9 Replies)
Discussion started by: jimmy_y
9 Replies
10. Shell Programming and Scripting
Hi All,
I need a code to print those lines where there's NO indents on the 1st field
Example shown below.
I tried to use the below codes but i am not able to see the expected result.
Can any expert give any advise ?
My Code
cat filename| awk '$1 ~ /^+$/ {print $0}'
Input
1199 ... (7 Replies)
Discussion started by: Raynon
7 Replies