Hands-on task
This task is step 22 of the course “awk and datamash: reports from tables”
awk: parsing /etc/passwd
From /etc/passwd, list the usernames whose login shell (the last field) equals /bin/bash, sorted by ascending UID (the third field, numeric). Write the result to /root/bash_users.txt, one name per line.
What you'll practise:
- awk
- field separator
- /etc/passwd
- filtering
- sort