how to Print 25 usernames on the system starting in reverse alphabetic order. Print only the usernames, nothing else. You should get the information from the /etc/passwd file.? in UNIX Command

  • 1
    Since this is clearly a homework exercise, the first response should be "What you have tried so far?" – roaima Mar 20 '15 at 16:24
  • 1
    Every question you've asked so far has been a homework question, hasn't it? – John Mar 20 '15 at 16:25
  • lp last -R -20 its a project for school thanks for the help – hdabaja Mar 20 '15 at 16:31
  • This may be relevant: meta.programmers.stackexchange.com/questions/6166/… – Sobrique Mar 20 '15 at 16:34

I'm happy to do your homework for you, less competition in the job market:

#  cat /etc/passwd|awk -F\: '{ print $1 }'| sort | head -20
  • i really appreciate your help :) and for all off you too – hdabaja Mar 20 '15 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.