Hands-on task
This task is step 5 of the course “cut, sort, uniq and friends”
User with the highest UID
Among users with a home directory in /home, find the one with the highest UID and write their name to /root/maxuid.txt. Take the data from /etc/passwd (fields separated by :, UID is the third), and compare UIDs as numbers.
Reference:sort
What you'll practise:
- sort
- -t delimiter
- -k field
- -n numeric sort
- cut/tail