Re: delete lines that contain duplicated column items
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jeff Zhang wrote:
> I have a simple txt file, like:
> ...
> a a
> aa a
> b b
> ba b
> ...
>
> I want to just keep the lines that first appeared in column 2 and delete
> the follow lines that contain duplicated ones in column 2.
> then it will like:
> ...
> a a
> b b
> ...
>
> I've tried `uniq -f1` but it didn't work.
Question: Are you asking someone to do your homework for you?
Question: Do you mean column 1. Column 2 doesn't have any duplicate
data in your example.
Joe
- --
Registerd Linux user #443289 at http://counter.li.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGEki3iXBCVWpc5J4RAu1bAKCEkD8DQbhI1VXYCmoBWuMDPCgQ5wCfUw1j
ZenPJCtbGZnGsTRJBtwq694=
=hNzi
-----END PGP SIGNATURE-----
Reply to: