Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • (1) If a username appears a ridiculous number (e.g., 42) of times in the password file, your command will print that name 41 times.   (2) While not stated as a requirement, the OP’s current code reports all the UIDs mapped to the duplicated usernames in the password file.  As long as you’re handling every line in the file, and splitting it into fields, that isn’t hard to do — I’ve posted an example. Commented Aug 2, 2016 at 1:14