Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
I need commands for finding duplicate uid's and logins in the /etc/passwd file. I have a suggestion to use cut, sort and uniq, but I have no clue how to put all this together.
thnx in advance
thank you for your reply, I will try playing with piping
no, didn't try anything yet, because I did not know where to start. I know that uniq can replace duplicate entries or something like that, but I do not need it replaced, just found.. We just started regular expressions, globing and all that, and we got stuck on this question..
I don't know how it relates to regular expressions eiter, but it came in the regular expressions lab.. We were able to solve all the rest of the problems but this one..
thanks for your help, I will try it after I come back from college tonight, because I have until tomorrow to turn it in
regular expressions can be used for pattern matching. (some advanced text search) guess you don't need it here, since you just want the first field.
just one little advice: Just start with small commands, and see what results you get, then add more and more options to see how the data steam changes (until you have the desired effect), and add another command in the pipe.
We were able to solve all the rest of the problems but this one (...) because I have until tomorrow to turn it in
Ner, I am under the impression we're helping you to complete your assignments. LQ has rules against asking for ready made answers where homework is concerned. This doesn't necessarily mean we're against helping you with your homework, but assignments are made to test your skills, ingenuity and knowledge. If you can show what you're sposed to do by posting idea's or scripts, then it's all OK. Asking for ready made answers on LQ for assignments is no substitute for learning.
Please address this issue now before adding new or replying to threads.
Whith all due respect, how do I address it?
- by understanding the LQ rules on homework, and
- by acknowledging you next time should post examples of what you tried and where you failed.
As moderator all I have to add is you should understand the difference: LQ members will help you by thinking with you about solving your problem, we just don't want to do your homework for you, that's all...
great, I do not want LQ members to do my homework for me either, all I need are examples and ideas.
By the way, even though I am not sure yet why we need < in the cut -f 1 -d ':' <..., I figured out how to do uids- put 3 instead of one, because the uid is the third field
Thanks again yapp
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.