Have some Coding problem!!!!! Please help :D thanks
I want to compare the uid in /etc/passwd. But i have no idea on how to compare with the huge numbers of row and columns? Please help me.
Thanks :D |
Hi,
Compare the (/etc/passwd) uid to what? and what needs to be done if it is (not) found? |
Firstly, you _really_ want to make your title more accurately reflect the content of the post. At best, you're going to attract bored programmers.
Secondly, you need to make your question more specific. What do you want to compare the values with? What's the actual problem you're trying to solve? The 'standard' manual for how to ask questions that get useful answers quickly is ESR's How To Ask Questions The Smart Way. I've written a decidedly less thorough but substantially shorter version at http://aviswebsite.co.uk/asking-questions/ I'd rather you read the former, but if you're not going to, at least read the latter, please. |
Sorry if i make my question not clear. Sorry.
I need to make sure that the uid are unique and has no repeat uid in the /etc/passwd file. I tried using loop but i did not mange to do it. |
Quote:
|
Quote:
cut -d: -f3 /etc/passwd | sort | uniq -d To print a list of uniq uids: cut -d: -f3 /etc/passwd | sort | uniq -u Hope this helps |
All times are GMT -5. The time now is 01:12 PM. |