Hi,
Dear Community,
I have a column like this:
D309
E308
G296
T297A
P415T
P415T
V457I
V457
A214G
A214
T418
I419V
P259
P259L
L191
A190
R478
R478H
. .. ...
or in other words you can say that this column is present in a very big file as column number 19. I want only those lines in which the number matches only with the next line, that is the output should be like this:
P415T
P415T
V457I
V457
A214G
A214
T418
I419V
P259
P259L
R478
R478H
I tried this command:
cut -f19 mycolumnfile.txt | uniq -d
I got this output:
P415T
As it matches with the whole line. I want only those rows in which the number matches only.
Thanks,
Waqas.
not clear.
for example, if my input is like this:
Whatever the character is present at first place, either P (in the first two lines) or V (in the lines three and four and so on,,,), I want to print those rows in which the numbers are repeated, that is 415 in the first two lines is repeated, or 457 in the lines three and four are repeated, so the output should be like this: