Signal9Signal9 — home
online
back to labs

Awk: Custom Field Separator

EasySed & Awk3-5 min
The brief

/root/work/accounts is colon-delimited — username:uid:home — not whitespace-separated.

Extract the USERNAME, the first field, of every line into /root/work/out.txt.

If the delimiter isn't accounted for, each whole line reads as a single field, and grading (which compares against the colon-split first field) will catch it.

What you'll do
  • Split each line on colons and take the username field
  • Save the usernames to /root/work/out.txt

Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.