Well, for the record, I'm new to awk so lpease be patient with me. :)
I sorted lines, but when I want to get rid of the lines for which 3rd field is unique, by comparing to the previous line, I don't get that previous line printed.
sort -k3,3 file.txt | awk 'BEGIN {prev=$3} ($3==prev) {print...
Hello to everyone. I need a help with this one.
I have a multicolumn file and I want to get a new file which contains only those lines that have the same value of a certain field (say 3rd) - all of them.
For example, I want this:
1 2 3 p
w 3 5 l
q 9...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.