Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Am trying to remove the duplicate records based on field wise.
But uniq command work only when fields are delimited by space ' '.
How to work on uniq command, when fields are delimited by comma , or another separators ?
You can probably do it all in sort. Pay attention to the -t, -k, and -u options. See "man sort"
Also, please say more about what you are trying to do. Show an example of what you want the results to look like from the input you have provided above.
Hi,
Am trying to remove the duplicate records based on field wise. But uniq command work only when fields are delimited by space ' '. How to work on uniq command, when fields are delimited by comma , or another separators ?
i hope this question is unique when compared to others and here am trying the options only in "uniq" command and not in any other commands, to understand how "uniq" is effective when compared to others.
Properly designed utilities work together. uniq needs sorted data and sort has quite a few supplemental capabilities and the two utilities compliment each other.
Show some examples of what you have been trying and explain more specifically what results you want, including examples.
hi tbone,
i hope this question is unique when compared to others and here am trying the options only in "uniq" command and not in any other commands, to understand how "uniq" is effective when compared to others.
No, it is not; it is use of the same tool in a slightly different manner. And again, you have shown no efforts of your own. You have done very similar things in the past, and have also asked for handouts in those threads as well.
We are happy to HELP you, but asking us to write your scripts is another thing. Also, you need to start thinking about and APPLYING what you are told, so you can learn how to accomplish these things. You have all the answers and information you need, based on your other threads. It is now up to YOU to do the work.
Great...but you've stated such things in the past as well. So can you now show us your own efforts, so we can try to help you??? Reference any of the other threads where you ask about uniq and other commands in scripts if you need help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.