Shell programming problem, Thx!# Unix - 噫吁兮,危乎高哉
d*m
1 楼
I have a text file. There are 2 columns in each line, seperated by \t\t
as follows (c1 and c2 are strings might contain blankspace ):
c1\t\tc2
The lines are sorted by c2
How can I count the appearance of strings c2 and delete all the rows
that c2 appears just once in this file? How can I do that by just using
unix command or using awk or sed?
Thank a lot!
as follows (c1 and c2 are strings might contain blankspace ):
c1\t\tc2
The lines are sorted by c2
How can I count the appearance of strings c2 and delete all the rows
that c2 appears just once in this file? How can I do that by just using
unix command or using awk or sed?
Thank a lot!